From 452008c81daf7af646e8432dc62c5a4ba488ae0b Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Thu, 4 Jan 2018 21:24:23 +0100 Subject: [PATCH] syntax: go: colorize only valid octal numbers Reported-by: Tom Levy --- syntax/go.nanorc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/syntax/go.nanorc b/syntax/go.nanorc index 77422840..6f12be2f 100644 --- 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|_)\>"