We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a25fc44 commit 00b0196Copy full SHA for 00b0196
bpython/cli.py
@@ -168,11 +168,13 @@ def next_token_inside_string(s, inside_string):
168
"""Given a code string s and an initial state inside_string, return
169
whether the next token will be inside a string or not."""
170
for token, value in PythonLexer().get_tokens(s):
171
- if token is Token.String and value in ['"""', "'''", '"', "'"]:
172
- if not inside_string:
173
- inside_string = value
174
- elif value == inside_string:
175
- inside_string = False
+ if token is Token.String:
+ value = value.lstrip('bBrRuU')
+ if value in ['"""', "'''", '"', "'"]:
+ if not inside_string:
+ inside_string = value
176
+ elif value == inside_string:
177
+ inside_string = False
178
return inside_string
179
180
0 commit comments