aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2023-01-22 07:45:29 -0500
committerMarshall Lochbaum <mwlochbaum@gmail.com>2023-01-22 07:45:29 -0500
commit10d74218aa7fdbb7a7bcc46b8b098432978cd748 (patch)
tree0bccb92f967a64071dad9ce187bba011843c5831
parent0e76b157375a8cc596c8a89a1cc01fb2a46e6419 (diff)
Use lookahead/lookbehind to avoid some highlighting glitches
-rw-r--r--editors/kak/autoload/filetype/bqn.kak8
1 files changed, 4 insertions, 4 deletions
diff --git a/editors/kak/autoload/filetype/bqn.kak b/editors/kak/autoload/filetype/bqn.kak
index ef94cb71..e82c8a51 100644
--- a/editors/kak/autoload/filetype/bqn.kak
+++ b/editors/kak/autoload/filetype/bqn.kak
@@ -48,13 +48,13 @@ add-highlighter shared/bqn/code/ regex "@" 0:string
add-highlighter shared/bqn/code/ regex "(?<![A-Z_a-z0-9π∞¯])¯?(¯_*)?((\d[\d_]*(\.\d[\d_]*)?|π_*)(e_*(¯_*)?\d[\d_]*)?|∞_*)(i_*(¯_*)?((\d[\d_]*(\.\d[\d_]*)?|π_*)(e_*(¯_*)?\d[\d_]*)?|∞_*))?" 0:value
add-highlighter shared/bqn/code/ regex "\." 0:normal
add-highlighter shared/bqn/code/ regex "[𝕗𝕘𝕨𝕩𝕤]" 0:normal
-add-highlighter shared/bqn/code/ regex "•|•?\b[a-z][A-Z_a-z0-9π∞¯]*|𝕣" 0:normal
+add-highlighter shared/bqn/code/ regex "•|•?(?<![A-Z_a-z0-9π∞¯])[a-z][A-Z_a-z0-9π∞¯]*|𝕣" 0:normal
add-highlighter shared/bqn/code/ regex "[𝔽𝔾𝕎𝕏𝕊+\-×÷⋆√⌊⌈|¬∧∨<>≠=≤≥≡≢⊣⊢⥊∾≍⋈↑↓↕«»⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔!⍕⍎]" 0:green
-add-highlighter shared/bqn/code/ regex "•?\b[A-Z][A-Z_a-z0-9π∞¯]*" 0:green
+add-highlighter shared/bqn/code/ regex "•?(?<![A-Z_a-z0-9π∞¯])[A-Z][A-Z_a-z0-9π∞¯]*" 0:green
add-highlighter shared/bqn/code/ regex "[˙˜˘¨⌜⁼´˝`]" 0:magenta
-add-highlighter shared/bqn/code/ regex "•?\b_[A-Za-z][A-Z_a-z0-9π∞¯]*|_𝕣" 0:magenta
+add-highlighter shared/bqn/code/ regex "•?(?<![A-Z_a-z0-9π∞¯])_[A-Za-z][A-Z_a-z0-9π∞¯]*|_𝕣" 0:magenta
add-highlighter shared/bqn/code/ regex "[∘○⊸⟜⌾⊘◶⎉⚇⍟⎊]" 0:yellow
-add-highlighter shared/bqn/code/ regex "•?\b_[A-Za-z][A-Z_a-z0-9π∞¯]*_|_𝕣_" 0:yellow
+add-highlighter shared/bqn/code/ regex "•?(?<![A-Z_a-z0-9π∞¯])_[A-Za-z][A-Z_a-z0-9π∞¯]*_(?![A-Z_a-z0-9π∞¯])|_𝕣_" 0:yellow
declare-user-mode bqn