[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] python string highliting is too greedy
From: |
Mike Frysinger |
Subject: |
[Nano-devel] python string highliting is too greedy |
Date: |
Sun, 24 Dec 2006 06:39:44 -0500 |
User-agent: |
KMail/1.9.5 |
the python colorization code is way too greedy when it comes to strings ...
attached patch makes it better (not saying it's completely correct)
-mike
pgp6idBLsE1gO.pgp
Description: PGP signature
Index: doc/syntax/python.nanorc
===================================================================
RCS file: /cvsroot/nano/nano/doc/syntax/python.nanorc,v
retrieving revision 1.1
diff -u -p -r1.1 python.nanorc
--- doc/syntax/python.nanorc 1 Jun 2006 17:23:28 -0000 1.1
+++ doc/syntax/python.nanorc 24 Dec 2006 11:37:31 -0000
@@ -3,6 +3,7 @@
syntax "python" "\.py$"
icolor brightblue "def [0-9A-Z_]+"
color brightcyan
"\<(and|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|map|not|or|pass|print|raise|return|try|while)\>"
-color brightgreen "["'].*[^\\]["']" "["']{3}.*[^\\]["']{3}"
+color brightgreen "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}"
+color brightgreen "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}"
color brightgreen start=""""[^"]" end=""""" start="'''[^']" end="'''"
color brightred "#.*$"
- [Nano-devel] python string highliting is too greedy,
Mike Frysinger <=