summaryrefslogtreecommitdiff
path: root/rc/core
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-09-30 21:39:57 +0800
committerMaxime Coste <mawww@kakoune.org>2017-10-25 10:27:39 +0800
commitbf6e5daa086d4dbde812e95b00dd951f09f7d398 (patch)
tree96c10a686a97c24840d953fc061d17ece57b3e96 /rc/core
parent78530b82bea5788e74d425b8d206090e8a497ef8 (diff)
Use stricter regex syntax
boost regex tolerates non-escaped special characters, and escaped non-special characters. Standardize on stricter syntax, where special characters must be escaped, and non-special characters must not.
Diffstat (limited to 'rc/core')
-rw-r--r--rc/core/kakrc.kak6
1 files changed, 3 insertions, 3 deletions
diff --git a/rc/core/kakrc.kak b/rc/core/kakrc.kak
index 13875bdb..1fa8852f 100644
--- a/rc/core/kakrc.kak
+++ b/rc/core/kakrc.kak
@@ -12,17 +12,17 @@ hook global BufCreate (.*/)?(kakrc|.*.kak) %{
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
add-highlighter -group / regions -default code kakrc \
- comment (^|\h)\K\# $ '' \
+ comment (^|\h)\K# $ '' \
double_string %{(^|\h)\K"} %{(?<!\\)(\\\\)*"} '' \
single_string %{(^|\h)\K'} %{(?<!\\)(\\\\)*'} '' \
shell '(^|\h)\K%sh\{' '\}' '\{' \
shell '(^|\h)\K%sh\(' '\)' '\(' \
shell '(^|\h)\K%sh\[' '\]' '\[' \
- shell '(^|\h)\K%sh\<' '\>' '\<' \
+ shell '(^|\h)\K%sh<' '>' '<' \
shell '(^|\h)\K-shell-(completion|candidates)\h+%\{' '\}' '\{' \
shell '(^|\h)\K-shell-(completion|candidates)\h+%\(' '\)' '\(' \
shell '(^|\h)\K-shell-(completion|candidates)\h+%\[' '\]' '\[' \
- shell '(^|\h)\K-shell-(completion|candidates)\h+%\<' '\>' '\<'
+ shell '(^|\h)\K-shell-(completion|candidates)\h+%<' '>' '<'
%sh{
# Grammar