Skip to content

Commit c001ce7

Browse files
committed
fix(lua): update escape and adjust coloring
- Numbers and escapes: magenta
1 parent a2833a1 commit c001ce7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lua.nanorc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ color brightmagenta "\<(false|nil|true)\>"
5353
color brightgreen "(\<(dofile|require|include)|%q|%!|%Q|%r|%x)\>"
5454

5555
# Numbers (hex and decimal with scientific notation)
56-
#color red "\<(0[xX](([0-9A-Fa-f]+\.[0-9A-Fa-f]*)|(\.?[0-9A-Fa-f]+))([pP][-+]?[0-9]+)?)\>"
57-
#color red "\<((([0-9]+\.[0-9]*)|(\.?[0-9]+))([eE][-+]?[0-9]+)?)\>"
58-
color red "\<((0[xX](([0-9A-Fa-f]+\.[0-9A-Fa-f]*)|(\.?[0-9A-Fa-f]+))([pP][-+]?[0-9]+)?)|((([0-9]+\.[0-9]*)|(\.?[0-9]+))([eE][-+]?[0-9]+)?))\>"
56+
#color magenta "\<(0[xX](([0-9A-Fa-f]+\.[0-9A-Fa-f]*)|(\.?[0-9A-Fa-f]+))([pP][-+]?[0-9]+)?)\>"
57+
#color magenta "\<((([0-9]+\.[0-9]*)|(\.?[0-9]+))([eE][-+]?[0-9]+)?)\>"
58+
color magenta "\<((0[xX](([0-9A-Fa-f]+\.[0-9A-Fa-f]*)|(\.?[0-9A-Fa-f]+))([pP][-+]?[0-9]+)?)|((([0-9]+\.[0-9]*)|(\.?[0-9]+))([eE][-+]?[0-9]+)?))\>"
5959

6060
# Symbols
6161
color brightmagenta "(\(|\)|\[|\]|\{|\})"
@@ -67,7 +67,7 @@ color red "\"(\\.|[^\\\"])*\"|'(\\.|[^\\'])*'"
6767
color red start="\s*\[\[" end="\]\]"
6868

6969
# Escapes
70-
#color red "\\[0-7][0-7][0-7]|\\x[0-9a-fA-F][0-9a-fA-F]|\\[abefnrs]|(\\c|\\C-|\\M-|\\M-\\C-)."
70+
color magenta "\\([abfnrtvz'\"]|[0-9]{1,3}|x[0-9a-fA-F][0-9a-fA-F]|u\{[0-9a-fA-F]+\})"
7171

7272
# Shebang
7373
color brightcyan "^#!.*"

0 commit comments

Comments
 (0)