mirror of
https://github.com/python/cpython.git
synced 2025-11-13 07:26:31 +00:00
Issue #8641: Update IDLE 3 syntax coloring to recognize b".." and not u"..".
(Patch by Tal Einat)
This commit is contained in:
commit
3be637e67f
3 changed files with 8 additions and 4 deletions
|
|
@ -20,10 +20,10 @@ def make_pat():
|
||||||
# 1st 'file' colorized normal, 2nd as builtin, 3rd as string
|
# 1st 'file' colorized normal, 2nd as builtin, 3rd as string
|
||||||
builtin = r"([^.'\"\\#]\b|^)" + any("BUILTIN", builtinlist) + r"\b"
|
builtin = r"([^.'\"\\#]\b|^)" + any("BUILTIN", builtinlist) + r"\b"
|
||||||
comment = any("COMMENT", [r"#[^\n]*"])
|
comment = any("COMMENT", [r"#[^\n]*"])
|
||||||
sqstring = r"(\b[rRuU])?'[^'\\\n]*(\\.[^'\\\n]*)*'?"
|
sqstring = r"(\b[rRbB])?'[^'\\\n]*(\\.[^'\\\n]*)*'?"
|
||||||
dqstring = r'(\b[rRuU])?"[^"\\\n]*(\\.[^"\\\n]*)*"?'
|
dqstring = r'(\b[rRbB])?"[^"\\\n]*(\\.[^"\\\n]*)*"?'
|
||||||
sq3string = r"(\b[rRuU])?'''[^'\\]*((\\.|'(?!''))[^'\\]*)*(''')?"
|
sq3string = r"(\b[rRbB])?'''[^'\\]*((\\.|'(?!''))[^'\\]*)*(''')?"
|
||||||
dq3string = r'(\b[rRuU])?"""[^"\\]*((\\.|"(?!""))[^"\\]*)*(""")?'
|
dq3string = r'(\b[rRbB])?"""[^"\\]*((\\.|"(?!""))[^"\\]*)*(""")?'
|
||||||
string = any("STRING", [sq3string, dq3string, sqstring, dqstring])
|
string = any("STRING", [sq3string, dq3string, sqstring, dqstring])
|
||||||
return kw + "|" + builtin + "|" + comment + "|" + string +\
|
return kw + "|" + builtin + "|" + comment + "|" + string +\
|
||||||
"|" + any("SYNC", [r"\n"])
|
"|" + any("SYNC", [r"\n"])
|
||||||
|
|
|
||||||
|
|
@ -275,6 +275,7 @@ Rodolpho Eckhardt
|
||||||
John Edmonds
|
John Edmonds
|
||||||
Grant Edwards
|
Grant Edwards
|
||||||
John Ehresman
|
John Ehresman
|
||||||
|
Tal Einat
|
||||||
Eric Eisner
|
Eric Eisner
|
||||||
Andrew Eland
|
Andrew Eland
|
||||||
Julien Élie
|
Julien Élie
|
||||||
|
|
|
||||||
|
|
@ -406,6 +406,9 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #8641: Update IDLE 3 syntax coloring to recognize b".." and not u"..".
|
||||||
|
Patch by Tal Einat.
|
||||||
|
|
||||||
- Issue #13464: Add a readinto() method to http.client.HTTPResponse. Patch
|
- Issue #13464: Add a readinto() method to http.client.HTTPResponse. Patch
|
||||||
by Jon Kuhn.
|
by Jon Kuhn.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue