syntaxes: remove unneeded backslash escapes before quotes

(They may have been needed in the past to avoid miscoloring of the
nanorc file itself, but they are no longer needed now.)
master
Benno Schulenberg 2020-07-27 10:47:27 +02:00
parent fd667b5191
commit f502f6fdb2
8 changed files with 14 additions and 14 deletions

View File

@ -14,7 +14,7 @@ color cyan "\<[[:upper:]_[:digit:]]+\>"
color red "\<[-_.0-9]+\>" color red "\<[-_.0-9]+\>"
# Strings: # Strings:
color red "\"[^"]*\"" "\'[^']*\'" color red ""[^"]*"" "'[^']*'"
# Backticks: # Backticks:
color green "`[^`]*`" color green "`[^`]*`"

View File

@ -27,7 +27,7 @@ color brightred "\<(t|nil)\>"
# Keywords # Keywords
color blue ":(\w|[?-])+" color blue ":(\w|[?-])+"
# Strings # Strings
color yellow start="^[[:blank:]]+\"" end="[^\]\"" color yellow start="^[[:blank:]]+"" end="[^\]""
color yellow ""(\\.|[^"])*"" color yellow ""(\\.|[^"])*""
# Comments # Comments
color cyan "(^|[[:space:]]);.*" color cyan "(^|[[:space:]]);.*"

View File

@ -18,7 +18,7 @@ color brightred "(#t|#f)\>"
# Keywords # Keywords
color blue "#?:(\w|[?-])+" color blue "#?:(\w|[?-])+"
# Strings # Strings
color yellow start="^[[:blank:]]+\"" end="[^\]\"" color yellow start="^[[:blank:]]+"" end="[^\]""
color yellow ""(\\.|[^"])*"" color yellow ""(\\.|[^"])*""
# Comments # Comments
color cyan "(^|[[:space:]]);.*" color cyan "(^|[[:space:]]);.*"

View File

@ -10,16 +10,16 @@ comment ""
# Numbers (used as value). # Numbers (used as value).
color green ":[[:space:]]*\-?(0|[1-9][0-9]*)(\.[0-9]+)?([Ee]?[-+]?[0-9]+)?" color green ":[[:space:]]*\-?(0|[1-9][0-9]*)(\.[0-9]+)?([Ee]?[-+]?[0-9]+)?"
# Values (well, any string). # Values (well, any string).
color brightmagenta "\".+\"" color brightmagenta "".+""
# Hex numbers (used as value). # Hex numbers (used as value).
color green ":[[:space:]]*\"#[0-9abcdefABCDEF]+\"" color green ":[[:space:]]*"#[0-9abcdefABCDEF]+""
# Escapes. # Escapes.
color green "\\\\" "\\\"" "\\[bfnrt]" "\\u[0-9abcdefABCDEF]{4})" color green "\\\\" "\\"" "\\[bfnrt]" "\\u[0-9abcdefABCDEF]{4})"
# Special words. # Special words.
color green "\<(true|false|null)\>" color green "\<(true|false|null)\>"
# Names (very unlikely to contain a quote). # Names (very unlikely to contain a quote).
color brightblue "\"[^"]+\"[[:space:]]*:" color brightblue ""[^"]+"[[:space:]]*:"
# Brackets, braces, and separators. # Brackets, braces, and separators.
color brightblue "\[" "\]" color brightblue "\[" "\]"

View File

@ -17,7 +17,7 @@ color yellow "^\.(RS|RE|UR|UE|PD|DT)"
color yellow "^\.(ad|bp|br|ce|de|ds|el|ie|if|fi|ft|hy|ig|in|na|ne|nf|nh|ps|so|sp|ti|tr)" color yellow "^\.(ad|bp|br|ce|de|ds|el|ie|if|fi|ft|hy|ig|in|na|ne|nf|nh|ps|so|sp|ti|tr)"
# Comments. # Comments.
color cyan "(^\.)?\\\".*" color cyan "(^\.)?\\".*"
# Trailing whitespace. # Trailing whitespace.
color ,green "[[:space:]]+$" color ,green "[[:space:]]+$"

View File

@ -7,7 +7,7 @@ comment "#"
color green "^#.*$" color green "^#.*$"
color yellow "Copyright|\(C\)" color yellow "Copyright|\(C\)"
# Header fields. # Header fields.
color brightred "^\"X-Bugs:.*\"$" color brightred "^"X-Bugs:.*"$"
color brightmagenta "\<(Project-Id-Version|Report-Msgid-Bugs-To|Last-Translator|Language(-Team)?|X-Bugs|X-Generator|Plural-Forms)\>" color brightmagenta "\<(Project-Id-Version|Report-Msgid-Bugs-To|Last-Translator|Language(-Team)?|X-Bugs|X-Generator|Plural-Forms)\>"
color cyan "\<(POT-Creation-Date|PO-Revision-Date|MIME-Version|Content-Type|Content-Transfer-Encoding)\>" color cyan "\<(POT-Creation-Date|PO-Revision-Date|MIME-Version|Content-Type|Content-Transfer-Encoding)\>"
# Encodings and numbers. # Encodings and numbers.
@ -21,7 +21,7 @@ color yellow " (no-)?[-[:alpha:]]+-format(,|$)"
# Format specifiers. # Format specifiers.
color brightmagenta "%([1-9]\$)?[a-z]*" color brightmagenta "%([1-9]\$)?[a-z]*"
# Quotes and escaped characters. # Quotes and escaped characters.
color yellow "\"" color yellow """
color cyan "\\([abcefnrtv"\]|x[0-9abcdefABCDEF]{2}|[0-7]{3})" color cyan "\\([abcefnrtv"\]|x[0-9abcdefABCDEF]{2}|[0-7]{3})"
# Reminders. # Reminders.
color brightwhite,yellow "\<(FIXME|TODO|XXX)\>" color brightwhite,yellow "\<(FIXME|TODO|XXX)\>"

View File

@ -22,10 +22,10 @@ color magenta "[A-Z][A-Z_0-9]+"
color magenta "[A-Z][A-Za-z0-9]+" color magenta "[A-Z][A-Za-z0-9]+"
# Strings # Strings
color green "\".*\"" color green "".*""
color green start="\".*\\$" end=".*\"" color green start="".*\\$" end=".*""
## NOTE: This isn't accurate, but matching "#{0,} for the end of the string is too liberal. ## NOTE: This isn't accurate, but matching "#{0,} for the end of the string is too liberal.
color green start="r#+\"" end="\"#+" color green start="r#+"" end=""#+"
# Comments # Comments
color blue "//.*" color blue "//.*"

View File

@ -12,7 +12,7 @@ color green start="<" end=">"
color cyan "<[^> ]+" ">" color cyan "<[^> ]+" ">"
# The strings inside the tag: # The strings inside the tag:
color magenta "\"[^"]*\"" color magenta ""[^"]*""
# Comments: # Comments:
color yellow start="<!DOCTYPE" end="[/]?>" color yellow start="<!DOCTYPE" end="[/]?>"