commit d9e42cb2741126b0eada3ad9ce82215bf0331700
parent 4d9be133169fb3f3b60231a0b2e342796f224274
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Wed, 3 Nov 2021 17:19:48 +0100
syntax: nanorc: require whitespace before the start= and end= keywords
Also, drop the unneeded and mistaken 'end=' in the first regex, as
a coloring rule with just end="something" is not valid. And drop
the requirement for having trailing whitespace or nothing at all,
as it does not constitute a useful restriction.
Also, fold two regexes together, for economy.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/syntax/nanorc.nanorc b/syntax/nanorc.nanorc
@@ -20,13 +20,13 @@ color brightgreen "^[[:blank:]]*(syntax[[:blank:]]+[^[:space:]]+|(formatter|lint
color green "^[[:blank:]]*((un)?(bind|set)|include|syntax|header|magic|comment|formatter|linter|tabgives|extendsyntax)\>"
# Strings
-color brightmagenta "([[:blank:]]|(start|end)=)".+"([[:blank:]]|$)"
+color brightmagenta "[[:blank:]](start=)?".+""
# Control codes
color bold,pink "[[:cntrl:]]"
# Color commands
-color magenta "^[[:blank:]]*i?color\>" "\<(start|end)="
+color magenta "^[[:blank:]]*i?color\>|[[:blank:]](start=|end=)"
# Comments
color brightblue "(^|[[:blank:]]+)#.*"