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:
parent
f9c48237a7
commit
3ae0d86b27
|
@ -12,9 +12,9 @@ hook global BufCreate .*[.](rust|rs) %{
|
|||
# ‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
add-highlighter -group / regions -default code rust \
|
||||
string '"' (?<!\\)(\\\\)*" '' \
|
||||
comment // $ '' \
|
||||
comment /\* \*/ /\*
|
||||
string %{(?<!')"} (?<!\\)(\\\\)*" '' \
|
||||
comment // $ '' \
|
||||
comment /\* \*/ /\*
|
||||
|
||||
add-highlighter -group /rust/string fill string
|
||||
add-highlighter -group /rust/comment fill comment
|
||||
|
|
Loading…
Reference in New Issue
Block a user