aboutsummaryrefslogtreecommitdiff
path: root/md.bqn
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-08-25 18:54:01 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-08-25 18:54:01 -0400
commitd2b372b66c473d4dbd51df6870ce5cb8ce9706b5 (patch)
treebd8525fad6cbffff4e680179d86ca5d9a9779f16 /md.bqn
parent32c7ecd7326f05673d0f3ff751ae4e4bc43f36cb (diff)
Highlight _𝕣 and _𝕣_ correctly
Diffstat (limited to 'md.bqn')
-rw-r--r--md.bqn8
1 files changed, 4 insertions, 4 deletions
diff --git a/md.bqn b/md.bqn
index e2b65992..ef85f253 100644
--- a/md.bqn
+++ b/md.bqn
@@ -459,7 +459,7 @@ TestSections ← {
# if a statement is an assignment.
idChars ← ⟨
•d∾"¯.π∞"
- ' '+⌾•UCS•a
+ "𝕣"∾˜' '+⌾•UCS•a
•a
"_"
@@ -511,6 +511,9 @@ GetHighlights ← {
# Color with "String" and "Comment"
col ⌈↩ +´ (1‿2-˜≠classes) × ToMask¨ tc
+ # UTF-16 hack: first half of a special name needs to match the second
+ col↩ (1⌽col) ⊣⌾((𝕩=⊑"𝕩")⊸/) col
+
# Color numeric literals and identifiers
id ← col=5 # ←→ 𝕩∊idChars
w ← 0⊸Shl⊸< id # Word (identifier or number) beginning mask
@@ -520,9 +523,6 @@ GetHighlights ← {
wi ← 1-˜+`id/w # Index of word containing each of /id
col↩(wi⊏wt)⌾(id⊸/) col
- # UTF-16 hack: first half of a special name needs to match the second
- col↩ (1⌽col) ⊣⌾((𝕩=⊑"𝕩")⊸/) col
-
# Tags are placed at boundaries between different colors
boundary ← ¯1⊸Shl⊸≠ col
bcol ← boundary / col