]> granicus.if.org Git - python/commitdiff
Issue #8641: Update IDLE 3 syntax coloring to recognize b".." and not u"..".
authorNed Deily <nad@acm.org>
Wed, 7 Dec 2011 09:08:35 +0000 (01:08 -0800)
committerNed Deily <nad@acm.org>
Wed, 7 Dec 2011 09:08:35 +0000 (01:08 -0800)
(Patch by Tal Einat)

Lib/idlelib/ColorDelegator.py
Misc/ACKS
Misc/NEWS

index ab69b8ac560693deb3b8374c150e0192df4acb12..29b4640967feb60d58a455a955c4b0b4f755df57 100644 (file)
@@ -20,10 +20,10 @@ def make_pat():
     # 1st 'file' colorized normal, 2nd as builtin, 3rd as string
     builtin = r"([^.'\"\\#]\b|^)" + any("BUILTIN", builtinlist) + r"\b"
     comment = any("COMMENT", [r"#[^\n]*"])
-    sqstring = r"(\b[rRuU])?'[^'\\\n]*(\\.[^'\\\n]*)*'?"
-    dqstring = r'(\b[rRuU])?"[^"\\\n]*(\\.[^"\\\n]*)*"?'
-    sq3string = r"(\b[rRuU])?'''[^'\\]*((\\.|'(?!''))[^'\\]*)*(''')?"
-    dq3string = r'(\b[rRuU])?"""[^"\\]*((\\.|"(?!""))[^"\\]*)*(""")?'
+    sqstring = r"(\b[rRbB])?'[^'\\\n]*(\\.[^'\\\n]*)*'?"
+    dqstring = r'(\b[rRbB])?"[^"\\\n]*(\\.[^"\\\n]*)*"?'
+    sq3string = r"(\b[rRbB])?'''[^'\\]*((\\.|'(?!''))[^'\\]*)*(''')?"
+    dq3string = r'(\b[rRbB])?"""[^"\\]*((\\.|"(?!""))[^"\\]*)*(""")?'
     string = any("STRING", [sq3string, dq3string, sqstring, dqstring])
     return kw + "|" + builtin + "|" + comment + "|" + string +\
            "|" + any("SYNC", [r"\n"])
index 4effde36afe68964fb6c9bc5d2b9675a94c55d96..0f921658d6678ea9e0c89b4c91406781cd03d3c7 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -256,6 +256,7 @@ Hans Eckardt
 Rodolpho Eckhardt
 Grant Edwards
 John Ehresman
+Tal Einat
 Eric Eisner
 Andrew Eland
 Julien Élie
index 8640d70c458e254f7a9cca790c1bb50e8da7d09f..91fae4505b4b45d5063c8109d88a153ab5f894bd 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -90,6 +90,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #8641: Update IDLE 3 syntax coloring to recognize b".." and not u"..".
+  Patch by Tal Einat.
+
 - tarfile.py: Correctly detect bzip2 compressed streams with blocksizes
   other than 900k.