Skip to content

Commit 4bae48d

Browse files
colorize the t-string
1 parent a15aeec commit 4bae48d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Lib/idlelib/colorizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def make_pat():
4747
name not in keyword.kwlist]
4848
builtin = r"([^.'\"\\#]\b|^)" + any("BUILTIN", builtinlist) + r"\b"
4949
comment = any("COMMENT", [r"#[^\n]*"])
50-
stringprefix = r"(?i:r|u|f|fr|rf|b|br|rb)?"
50+
stringprefix = r"(?i:r|u|f|fr|rf|b|br|rb|t|tr|rt)?"
5151
sqstring = stringprefix + r"'[^'\\\n]*(\\.[^'\\\n]*)*'?"
5252
dqstring = stringprefix + r'"[^"\\\n]*(\\.[^"\\\n]*)*"?'
5353
sq3string = stringprefix + r"'''[^'\\]*((\\.|'(?!''))[^'\\]*)*(''')?"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
support t-string prefix in colorizer

0 commit comments

Comments
 (0)