aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-16 11:54:31 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-16 11:54:31 -0400
commit49cca4913c2fe3de12f179e9dd26e0b462b6836d (patch)
treeddcdd784c057ff91f27e2898d294475677f081ef
parent8b98b5429be5afdcc63094001259cdf27d53ad35 (diff)
Fixes and rearrangement in the syntax highlighter
-rw-r--r--doc/md.bqn22
1 files changed, 11 insertions, 11 deletions
diff --git a/doc/md.bqn b/doc/md.bqn
index 9b04405b..b9838256 100644
--- a/doc/md.bqn
+++ b/doc/md.bqn
@@ -193,23 +193,23 @@ Highlight ← {
"_"
classes‿chars ← <˘ ⍉ 2⊸(÷˜⟜≠∾⊣)⊸⥊⟨
+ 0 , " "∾•UCS 9‿10
"Value" , ¯1⊏˘5‿2⥊"𝕨𝕩𝕗𝕘𝕤"
"Function" , "+-×÷⋆√⌊⌈|¬∧∨<>≠=≤≥≡≢⊣⊢⥊∾≍↑↓↕⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔!"∾¯1⊏˘5‿2⥊"𝕎𝕏𝔽𝔾𝕊"
"Modifier" , "˜˘¨⌜⁼´`"
"Composition" , "∘○⊸⟜⌾⊘◶⎉⚇⍟"
- "Number" , •d∾"¯.π∞"
- "Alphabetic" , "_"∾˜' '(+∾⊢)⌾•UCS•a
- "Separator" , "⋄,"
+ "Number" , ∾idChars
"Gets" , "←↩→"
- "Bracket" , "()⟨⟩"
+ "Paren" , "()"
+ "Bracket" , "⟨⟩"
"Brace" , "{}"
"Ligature" , "‿"
"Nothing" , "·"
+ "Separator" , "⋄,"
"Comment" , "#"
"String" , "'"""
- 0 , " "∾•UCS 9‿10
- classTag ← ""‿""∾˜>{⟨"<span class='"∾𝕩∾"'>","</span>"⟩}¨¯1↓classes
+ classTag ← ""‿""∾>{⟨"<span class='"∾𝕩∾"'>","</span>"⟩}¨1↓classes
FindGroup ← { (+`≠¨𝕨) ⍋ (∾𝕨) ⊐ 𝕩 }
r←𝕩='#'⋄s←/(≠↑2⊸↓)⊸∧𝕩='''⋄d←/𝕩='"'
@@ -218,17 +218,17 @@ Highlight ← {
Se←{(⊏˜𝕨)Se 1¨⌾((𝕩/𝕨)⊸⊏)𝕩}⍟{0=⊑⌽𝕩}
st←¯1↓Se⟜(1↑˜≠)∾⟜≠q⍋e⋄b←st/q∾˘e
ToI←¯1↓·/⁼(≠𝕩)∾˜⥊
- str‿com←(≠`∨⊢)∘ToI∘>¨¯1↓((st/q)⊏r)⊔○(∾⟜2)<˘b
- col←14⌊((12×com)+(13×str))⌈chars FindGroup 𝕩
+ sc←+´(1‿2-˜≠classes)×(≠`∨⊢)∘ToI∘>¨¯1↓((st/q)⊏r)⊔○(∾⟜2)<˘b
+ col←sc⌈14|chars FindGroup 𝕩
- w←(≠↑0∾⊢)⊸<id←col∊4‿5
- idc←5|1-˜(idChars FindGroup w/𝕩)+'_'=((1↓∾⟜0)⊸<id)/𝕩
+ w←(≠↑0∾⊢)⊸<id←col=5
+ idc←1+5|1-˜(idChars FindGroup w/𝕩)+'_'=((1↓∾⟜0)⊸<id)/𝕩
col↩((id/+`w)⊏0∾idc)⌾(id⊸/)col
col↩(1⌽col)⊣⌾((𝕩=⊑"𝕩")⊸/)col
bd←(≠↑¯1∾⊢)⊸≠col
- f←14≠bd/col
+ f←0<bd/col
tags←⥊f/(bd/col)⊏classTag
pos←⥊f/2↕/bd∾1
((↕≠𝕩)∾˜(≠¨tags)/pos) ⍋⊸⊏ 𝕩∾˜∾tags