rust highlighter: '"' is not the start of a string

this uses the string opening regex from the c-family highlighter to prevent
highlighting the rest of the file as a string on encountering the character
literal '"'
This commit is contained in:
Dianne Wagner 2017-06-18 18:39:45 -07:00
parent f9c48237a7
commit 3ae0d86b27

View File

@ -12,7 +12,7 @@ hook global BufCreate .*[.](rust|rs) %{
# ‾‾‾‾‾‾‾‾‾‾‾‾ # ‾‾‾‾‾‾‾‾‾‾‾‾
add-highlighter -group / regions -default code rust \ add-highlighter -group / regions -default code rust \
string '"' (?<!\\)(\\\\)*" '' \ string %{(?<!')"} (?<!\\)(\\\\)*" '' \
comment // $ '' \ comment // $ '' \
comment /\* \*/ /\* comment /\* \*/ /\*