lua.kak: Fix string highlighting with -match-capture regions

With the introduction of -match-capture for the lua region highlighter,
the string closing regex had spurious captures that were not going to
match.

Fixes #1850
This commit is contained in:
Maxime Coste 2018-02-18 16:21:05 +11:00
parent eb2e44e0eb
commit 4f75358ce3

View File

@ -12,8 +12,8 @@ hook global BufCreate .*[.](lua) %{
# ‾‾‾‾‾‾‾‾‾‾‾‾
add-highlighter shared/ regions -default code -match-capture lua \
string '"' (?<!\\)(\\\\)*" '' \
string "'" (?<!\\)(\\\\)*' '' \
string '"' (?<!\\)(?:\\\\)*" '' \
string "'" (?<!\\)(?:\\\\)*' '' \
string '\[(=*)\[' '\](=*)\]' '' \
comment '--\[(=*)\[' '\](=*)\]' '' \
comment '--' '$' '' \