From 3b1c8c92c50f6d461f0af0f5c8f4c1944e6ef2d1 Mon Sep 17 00:00:00 2001 From: Tom Levy Date: Sun, 31 Dec 2017 06:12:15 +0000 Subject: [PATCH 1/2] syntax: go: fix word boundary before dot in number literal The regex "\<\.[0-9]+([Ee][+-][0-9]+)?i?\>" can never match anything because \< matches the beginning of a word but "." is not a word character. Replace \< with \B (empty string not at the edge of a word). Signed-off-by: Tom Levy --- syntax/go.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax/go.nanorc b/syntax/go.nanorc index 308e976d..6be9df14 100644 --- a/syntax/go.nanorc +++ b/syntax/go.nanorc @@ -26,7 +26,7 @@ color brightcyan "//[[:space:]]*\+build[[:space:]]+(([a-zA-Z_0-9]+[[:space:]]*)+ # Literals. color red "\<[0-9]+\.[0-9]*([Ee][+-][0-9]+)?i?\>" color red "\<[0-9]+[Ee][+-][0-9]+i?\>" -color red "\<\.[0-9]+([Ee][+-][0-9]+)?i?\>" +color red "\B\.[0-9]+([Ee][+-][0-9]+)?i?\>" color red "\<[0-9]+i\>" color red "\<[1-9][0-9]*\>" color red "\<0[0-7]*\>" -- 2.11.0