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]+\>"
# Strings:
color red "\"[^"]*\"" "\'[^']*\'"
color red ""[^"]*"" "'[^']*'"
# Backticks:
color green "`[^`]*`"

View File

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

View File

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

View File

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

View File

@ -7,7 +7,7 @@ comment "#"
color green "^#.*$"
color yellow "Copyright|\(C\)"
# 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 cyan "\<(POT-Creation-Date|PO-Revision-Date|MIME-Version|Content-Type|Content-Transfer-Encoding)\>"
# Encodings and numbers.
@ -21,7 +21,7 @@ color yellow " (no-)?[-[:alpha:]]+-format(,|$)"
# Format specifiers.
color brightmagenta "%([1-9]\$)?[a-z]*"
# Quotes and escaped characters.
color yellow "\""
color yellow """
color cyan "\\([abcefnrtv"\]|x[0-9abcdefABCDEF]{2}|[0-7]{3})"
# Reminders.
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]+"
# Strings
color green "\".*\""
color green start="\".*\\$" end=".*\""
color green "".*""
color green start="".*\\$" end=".*""
## 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
color blue "//.*"

View File

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