commit 452008c81daf7af646e8432dc62c5a4ba488ae0b parent 97cbbb0cc8670ebd2d5711a5f80f04db056a83b7 Author: Benno Schulenberg <bensberg@telfort.nl> Date: Thu, 4 Jan 2018 21:24:23 +0100 syntax: go: colorize only valid octal numbers Reported-by: Tom Levy <tomlevy93@gmail.com> Diffstat:
M | syntax/go.nanorc | | | 6 | +++--- |
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/syntax/go.nanorc b/syntax/go.nanorc @@ -24,9 +24,9 @@ color brightcyan "\<(package|import)\>" color brightcyan "//[[:space:]]*\+build[[:space:]]+(([a-zA-Z_0-9]+[[:space:]]*)+,[[:space:]]*)*[a-zA-Z_0-9]+" # Literals. -color red "\<[0-9]+(\.[0-9]*)?([Ee][+-]?[0-9]+)?i?\>" -color red "\B\.[0-9]+([Ee][+-]?[0-9]+)?i?\>" -color red "\<(0[0-7]*|[1-9][0-9]*|0[xX][0-9a-fA-F]+)\>" +color red "\<0([0-7]*|[xX][0-9a-fA-F]+)\>" +color red "(\<0+|\B)\.[0-9]+([Ee][+-]?[0-9]+)?i?\>" +color red "\<[1-9][0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?i?\>" # Strings and characters; slightly fuzzy. color red "\<(true|false|nil|iota|_)\>"