diff --git a/syntax/autoconf.nanorc b/syntax/autoconf.nanorc index bdd392d9..49b7d92b 100644 --- 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 index 409c1f44..473b93bb 100644 --- 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 index 0997130a..5d5e4e04 100644 --- 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 index 14dc57cf..39262963 100644 --- 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 index 06396120..811aa1b9 100644 --- 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 index b286d6bd..c9f0bccf 100644 --- 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 index 5a79624b..6863dd8a 100644 --- 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 index 212b2c15..8aab9f46 100644 --- 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=""