nano/syntax
Benno Schulenberg 485eb18d83 syntaxes: use one regex for coloring quoted strings, to avoid overlap
Quoted strings cannot start within another quoted string and end after
that other string has ended.  Therefore single-quoted and double-quoted
strings should (as much as possible) be colorized by a single rule, so
that overlapping colorations are avoided.

(This also fixes a double typo in the PHP syntax (\. --> \\.) that has
been there since the PHP syntax was added in 2008, commit 90ee8ee4.)

This fixes https://savannah.gnu.org/bugs/?61387.

Bug existed since each of these syntaxes was introduced,
the oldest ones around 2006, a few others around 2015.

The one that got it right was the Lua syntax from 2011.
2021-10-26 13:28:33 +02:00
..
extra syntaxes: use one regex for coloring quoted strings, to avoid overlap 2021-10-26 13:28:33 +02:00
asm.nanorc syntaxes: replace [[:space:]] with [[:blank:]] to exclude carriage return 2021-04-27 11:18:41 +02:00
autoconf.nanorc syntaxes: use one regex for coloring quoted strings, to avoid overlap 2021-10-26 13:28:33 +02:00
awk.nanorc syntaxes: drop three redundant end-of-line anchors 2021-10-15 10:17:28 +02:00
c.nanorc syntaxes: undouble the backslash within bracket expressions 2021-10-18 12:14:05 +02:00
changelog.nanorc syntaxes: replace [[:space:]] with [[:blank:]] to exclude carriage return 2021-04-27 11:18:41 +02:00
cmake.nanorc syntaxes: replace [[:space:]] with [[:blank:]] to exclude carriage return 2021-04-27 11:18:41 +02:00
css.nanorc syntax: css: differentiate pseudo-classes (now cyan) from comments (blue) 2020-07-30 09:25:12 +02:00
default.nanorc syntaxes: replace [[:space:]] with [[:blank:]] to exclude carriage return 2021-04-27 11:18:41 +02:00
elisp.nanorc syntaxes: replace [[:space:]] with [[:blank:]] to exclude carriage return 2021-04-27 11:18:41 +02:00
email.nanorc syntax: email: use a character class, as \s does not work inside brackets 2021-10-18 11:52:05 +02:00
go.nanorc syntaxes: use one regex for coloring quoted strings, to avoid overlap 2021-10-26 13:28:33 +02:00
groff.nanorc tweaks: remove redundant pair of parentheses, and swap two alternatives 2021-10-25 12:45:45 +02:00
guile.nanorc syntaxes: replace [[:space:]] with [[:blank:]] to exclude carriage return 2021-04-27 11:18:41 +02:00
html.nanorc syntaxes: uniformize the initial comment 2020-04-20 19:21:56 +02:00
java.nanorc syntaxes: uniformize the initial comment 2020-04-20 19:21:56 +02:00
javascript.nanorc syntaxes: use one regex for coloring quoted strings, to avoid overlap 2021-10-26 13:28:33 +02:00
json.nanorc syntaxes: replace [[:space:]] with [[:blank:]] to exclude carriage return 2021-04-27 11:18:41 +02:00
lua.nanorc syntaxes: replace [[:space:]] with [[:blank:]] to exclude carriage return 2021-04-27 11:18:41 +02:00
Makefile.am syntax: ada: new file -- coloring rules for Ada 2012 files 2020-06-21 09:33:14 +02:00
makefile.nanorc syntaxes: replace [[:space:]] with [[:blank:]] to exclude carriage return 2021-04-27 11:18:41 +02:00
man.nanorc syntaxes: remove unneeded backslash escapes before quotes 2020-07-27 13:23:13 +02:00
markdown.nanorc syntax: markdown: add author and license line 2020-09-15 19:11:35 +02:00
nanohelp.nanorc help: use smaller triangles for the arrows 2021-06-14 09:29:27 +02:00
nanorc.nanorc syntax: nanorc: improve the file-matching regex 2021-10-25 12:44:28 +02:00
nftables.nanorc syntaxes: use one regex for coloring quoted strings, to avoid overlap 2021-10-26 13:28:33 +02:00
objc.nanorc syntaxes: undouble the backslash within bracket expressions 2021-10-18 12:14:05 +02:00
ocaml.nanorc syntaxes: remove quotes from each syntax name, and color it differently 2018-02-14 17:36:50 +01:00
patch.nanorc syntaxes: uniformize the initial comment 2020-04-20 19:21:56 +02:00
perl.nanorc syntax: perl, ruby: remove arbitrary highlighting of here documents 2021-08-09 09:56:50 +02:00
php.nanorc syntaxes: use one regex for coloring quoted strings, to avoid overlap 2021-10-26 13:28:33 +02:00
po.nanorc syntaxes: drop three redundant end-of-line anchors 2021-10-15 10:17:28 +02:00
python.nanorc syntaxes: use one regex for coloring quoted strings, to avoid overlap 2021-10-26 13:28:33 +02:00
ruby.nanorc syntax: ruby: colorize embedded documentation as a comment 2021-10-25 13:45:21 +02:00
rust.nanorc syntax: rust: do not colorize as string the text between two strings 2021-10-22 10:44:49 +02:00
sh.nanorc syntaxes: use one regex for coloring quoted strings, to avoid overlap 2021-10-26 13:28:33 +02:00
sql.nanorc syntax: sql: rename the file to match the name of the syntax 2020-06-16 14:44:57 +02:00
tcl.nanorc syntaxes: use one regex for coloring quoted strings, to avoid overlap 2021-10-26 13:28:33 +02:00
tex.nanorc syntaxes: uniformize the initial comment 2020-04-20 19:21:56 +02:00
texinfo.nanorc syntax: texinfo: be more precise in colorizing @commands 2021-10-17 12:25:01 +02:00
xml.nanorc syntaxes: remove unneeded backslash escapes before quotes 2020-07-27 13:23:13 +02:00
yaml.nanorc syntax: yaml: allow slash and period in key names 2021-10-03 15:38:43 +02:00