Commit 091e8faf authored by Tom Levy's avatar Tom Levy Committed by Benno Schulenberg
Browse files

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: default avatarTom Levy <tomlevy93@gmail.com>
No related merge requests found
Showing with 2 additions and 2 deletions
+2 -2
...@@ -57,8 +57,8 @@ color green "\-\-.*$" ...@@ -57,8 +57,8 @@ color green "\-\-.*$"
color green start="\-\-\[\[" end="\]\]" color green start="\-\-\[\[" end="\]\]"
# Strings # Strings
color red "\"(\\.|[^\\\"])*\"|'(\\.|[^\\'])*'" color red ""(\\.|[^"\])*"|'(\\.|[^'\])*'"
##color red start="\[\[" end="\]\]" ##color red start="\[\[" end="\]\]"
# Hex literals # Hex literals
color red "0x[0-9a-fA-F]*" color red "\<0x[0-9a-fA-F]+\>"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment