2015-12-02 Benno Schulenberg <bensberg@justemail.net>
* doc/syntax/python.nanorc: Don't colour triple quotes by themselves.
+ * doc/syntax/python.nanorc: Treat backslashed quotes properly, and
+ don't colour triple-quoted strings in two manners.
2015-12-02 Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
* doc/syntax/nftables.nanorc: New file; syntax colouring for nftables.
color brightcyan "\<(and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from)\>"
color brightcyan "\<(global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield)\>"
-# Strings.
-color brightgreen "['][^']*[^'\\][']" "[']{3}.*[^'\\][']{3}"
-color brightgreen "["][^"]*[^"\\]["]" "["]{3}.*[^"\\]["]{3}"
+# Single-quoted strings.
+color brightgreen "'([^'\]|\\.)+'"
+color brightgreen ""([^"\]|\\.)+""
# Comments.
color brightred "(^|[[:blank:]])#.*$"
-# Multiline strings.
-color brightgreen start="\"\"\"[^"),]" end="(^|[^(])\"\"\""
-color brightgreen start="'''[^'),]" end="(^|[^(])'''"
+# Triple-quoted strings.
+color brightgreen start="'''[^'),]" end="(^|[^(\])'''"
+color brightgreen start="\"\"\"[^"),]" end="(^|[^(\])\"\"\""
# Reminders.
color ,yellow "(FIXME|TODO|XXX)"