tweaks: swap two parts of specific regexes, for consistency with others

This order makes more sense to me: first the part that allows
almost everything, and then the special case.
This commit is contained in:
Benno Schulenberg
2021-10-27 09:45:42 +02:00
parent 7bd68365ec
commit 1cd92458e9
15 changed files with 17 additions and 17 deletions

View File

@@ -34,7 +34,7 @@ icolor yellow "\<(.or.|repeat|select case|then|where|while)\>"
icolor magenta "\<(continue|cycle|exit|go?to|result|return)\>"
# Strings.
color yellow ""(\\.|[^"\])*""
color yellow ""([^"\]|\\.)*""
# Comments.
color blue "!.*"

View File

@@ -41,7 +41,7 @@ color blue "\<(awk|cat|cd|chmod|chown|cp|echo|env|find|e?grep|ln|make|mkdir|mv|p
## Comments (doesn't work that well):
color yellow "(^|[[:space:]])#.*"
## Strings (doesn't work that well):
color brightyellow ""(\\.|[^"\])*"|'(\\.|[^'\])*'"
color brightyellow ""([^"\]|\\.)*"|'([^'\]|\\.)*'"
## Trailing space is bad!
color ,green "[[:space:]]+$"
## Mixed whitespace is also bad.