commit f502f6fdb25378632734a98332344f08833e1251
parent fd667b519188576200db4d121853d1205ccf2ab3
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Mon, 27 Jul 2020 10:47:27 +0200
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.)
Diffstat:
8 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/syntax/autoconf.nanorc b/syntax/autoconf.nanorc
@@ -14,7 +14,7 @@ color cyan "\<[[:upper:]_[:digit:]]+\>"
color red "\<[-_.0-9]+\>"
# Strings:
-color red "\"[^"]*\"" "\'[^']*\'"
+color red ""[^"]*"" "'[^']*'"
# Backticks:
color green "`[^`]*`"
diff --git a/syntax/elisp.nanorc b/syntax/elisp.nanorc
@@ -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:]]);.*"
diff --git a/syntax/guile.nanorc b/syntax/guile.nanorc
@@ -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:]]);.*"
diff --git a/syntax/json.nanorc b/syntax/json.nanorc
@@ -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 "\[" "\]"
diff --git a/syntax/man.nanorc b/syntax/man.nanorc
@@ -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:]]+$"
diff --git a/syntax/po.nanorc b/syntax/po.nanorc
@@ -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)\>"
diff --git a/syntax/rust.nanorc b/syntax/rust.nanorc
@@ -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 "//.*"
diff --git a/syntax/xml.nanorc b/syntax/xml.nanorc
@@ -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="[/]?>"