mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-22 12:51:23 +03:00
syntax: lua: require at least one digit for hexadecimal numbers
Since a "0x" by itself is invalid. Also add word boundaries, so that e.g. "00x1" (which is invalid) does not get partial highlighting. Also remove some redundant backslashes from the strings regex. Signed-off-by: Tom Levy <tomlevy93@gmail.com>
This commit is contained in:
parent
d8ea89f6a6
commit
091e8faf6d
@ -57,8 +57,8 @@ color green "\-\-.*$"
|
||||
color green start="\-\-\[\[" end="\]\]"
|
||||
|
||||
# Strings
|
||||
color red "\"(\\.|[^\\\"])*\"|'(\\.|[^\\'])*'"
|
||||
color red ""(\\.|[^"\])*"|'(\\.|[^'\])*'"
|
||||
##color red start="\[\[" end="\]\]"
|
||||
|
||||
# Hex literals
|
||||
color red "0x[0-9a-fA-F]*"
|
||||
color red "\<0x[0-9a-fA-F]+\>"
|
||||
|
Loading…
Reference in New Issue
Block a user