From 44836e77bef6a526801f4eaf8a9d88e49aa39f12 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Tue, 7 Dec 2021 12:40:24 +0100 Subject: [PATCH] syntax: nanorc: colorize a trailing comment when it begins with non-hex That is: colorize text after a blank-plus-hash as a comment when there is at least one non-hexadecimal character among the first three. This relaxes the demand that a trailing comment should have a blank after the hash too, as implemented by commit 90946c5e two weeks ago. --- syntax/nanorc.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax/nanorc.nanorc b/syntax/nanorc.nanorc index 1325c0e6..fe2177cf 100644 --- a/syntax/nanorc.nanorc +++ b/syntax/nanorc.nanorc @@ -33,7 +33,7 @@ color magenta "^[[:blank:]]*i?color\>|[[:blank:]](start=|end=)" color bold,pink "[[:cntrl:]]" # Comments -color brightblue "^[[:blank:]]*#.*|[[:blank:]]#[[:blank:]].*" +color brightblue "^[[:blank:]]*#.*|[[:blank:]]#.{0,2}[^[:xdigit:]].*" color cyan "^[[:blank:]]*##.*" # Trailing whitespace