diff options
| -rw-r--r-- | md.bqn | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -158,7 +158,7 @@ _getCodeExec ← {𝕗⋄•MakeREPL@} _getSvgExec ← {𝕗 e←•MakeREPL@ ⟨"","",GetHighlights‿Modify‿E⟩ E "GetHighlights‿Modify‿Eval←•args" - E•FChars"svg.bqn" + E •file.Chars "svg.bqn" JoinLines⍟(1<≡)∘E } @@ -308,8 +308,8 @@ Markdown ← {filename𝕊𝕩: IsHtmlBlock ← ("<!--"≡4↑⊢)◶('>'∨´∘=⊢)‿2 ProcComment ← { n←≠s←"<!--GEN" ⋄ l←¯3↓⍟(1=≠𝕩)⊑𝕩 ⋄ a←s≡n↑l - Source ← {((0<≠)◶<‿(•FLines path∾⊢) Trim n↓l) ∾ 1↓¯1↓𝕩} - ⟨path⟩ GenHtml⍟a JoinLines Source⍟a 𝕩 + Source ← {((0<≠)◶<‿(•file.Lines path∾⊢) Trim n↓l) ∾ 1↓¯1↓𝕩} + ⟨•file.At path⟩ GenHtml⍟a JoinLines Source⍟a 𝕩 } ProcHtml ← { codeMask ← "<code>" (6⥊0)⊸»⊸(>○(⌈`(1+↕∘≠)⊸×))○((≠𝕩)↑⍷⟜𝕩) "</code>" @@ -508,7 +508,7 @@ Markdown ← {filename𝕊𝕩: # Uses the test cases at https://spec.commonmark.org/0.29/spec.json # since Github doesn't seem to have published theirs TestSections ← { - tests ← ¯2 ↓˘ 8⊸(÷˜⟜≠∾⊣)⊸⥊ 2↓•FLines"spec.json" + tests ← ¯2 ↓˘ 8⊸(÷˜⟜≠∾⊣)⊸⥊ 2↓•file.Lines"spec.json" tests ↩ ((⊑2+⊐⟜':')¨∘⊏ ((-','=¯1⊑⊢)↓↓)¨⎉1 ⊢) tests testSection ← (1↓¯1↓⊢)¨ 5⊏˘tests UnEscape ← { @@ -634,7 +634,7 @@ ConvertFile ← { fileout ← ".html" ∾˜ (¯6⊸↓∾"index"˙)⍟("README"⊸MatchEnd) ¯3↓𝕩 # Contents of file to convert - md ← •FLines 𝕩 + md ← •file.Lines 𝕩 # Verify and remove the html link line: the output *is* the html file. IsView ← "*View this file"⊸MatchStart ∧ (siteURL∾fileout∾").*")⊸MatchEnd ⟨"File ",𝕩," has missing or incorrect view link"⟩ ∾⊸! IsView ⊑md @@ -656,7 +656,7 @@ ConvertFile ← { crumbs ← up ("a href='"∾∾⟜"index.html'")⊸Html¨○((-isInd)⊸↓) (<"BQN")»parts nav ← RQ "div class='nav'" Html 3↓∾ " / "⊸∾¨ repo <⊸∾ crumbs front ← head ∾○(∾⟜lf) nav - ("docs/"∾fileout) •FChars front ∾ out + ("docs/"∾fileout) •file.Chars front ∾ out } ConvertFile¨ •args |
