summaryrefslogtreecommitdiff
path: root/rc/base/lua.kak
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/base/lua.kak
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/base/lua.kak')
-rw-r--r--rc/base/lua.kak8
1 files changed, 4 insertions, 4 deletions
diff --git a/rc/base/lua.kak b/rc/base/lua.kak
index f37e7039..9b453dbf 100644
--- a/rc/base/lua.kak
+++ b/rc/base/lua.kak
@@ -12,10 +12,10 @@ hook global BufCreate .*[.](lua) %{
# ‾‾‾‾‾‾‾‾‾‾‾‾
add-highlighter -group / regions -default code lua \
- string '"' (?<!\\)(\\\\)*" '' \
- string "'" (?<!\\)(\\\\)*' '' \
- comment '--' '$' '' \
- comment '\Q--[[' ']]' '' \
+ string '"' (?<!\\)(\\\\)*" '' \
+ string "'" (?<!\\)(\\\\)*' '' \
+ comment '--' '$' '' \
+ comment '--\[\[' '\]\]' '' \
add-highlighter -group /lua/string fill string