From 12d70d75b47949afa8b6729c338fd09cd8e45651 Mon Sep 17 00:00:00 2001 From: Tom Levy Date: Sun, 31 Dec 2017 03:54:01 +0000 Subject: [PATCH 2/6] syntax: lua: number literals: support fractional part and exponent The new regex does not match a leading or trailing dot, but it's good enough. Discussion on the mailing list: https://lists.gnu.org/archive/html/nano-devel/2017-12/msg00121.html Signed-off-by: Tom Levy --- syntax/lua.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax/lua.nanorc b/syntax/lua.nanorc index 25f51c4d..2c3ed848 100644 --- a/syntax/lua.nanorc +++ b/syntax/lua.nanorc @@ -42,7 +42,7 @@ color brightmagenta "\<(false|nil|true)\>" color brightgreen "\<(dofile|require)\>" # Numbers -color red "\<([0-9]+)\>" +color red "\<[0-9]+(\.[0-9]*)?([Ee][+-]?[0-9]+)?\>" # Symbols color brightmagenta "(\(|\)|\[|\]|\{|\})" -- 2.11.0