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.
master
Benno Schulenberg 2021-11-03 17:19:48 +01:00
parent 4d9be13316
commit d9e42cb274
1 changed files with 2 additions and 2 deletions

View File

@ -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:]]+)#.*"