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 bdaf477 commit aadb371Copy full SHA for aadb371
ptpython/completer.py
@@ -62,9 +62,9 @@ def double_quoted_wrapper(text):
62
grammar = r"""
63
# Text before the current string.
64
(
65
- [^'"#] | # Not quoted characters.
66
- ''' ([^']|'[^']|''[^']|\\.)* ''' | # Inside single quoted triple strings
67
- "" " ([^"]|"[^"]|""[^"]|\\.)* "" " | # Inside double quoted triple strings
+ [^'"#] | # Not quoted characters.
+ ''' ([^'\\]|'(?!')|''(?!')|\\.])* ''' | # Inside single quoted triple strings
+ "" " ([^"\\]|"(?!")|""(?!^)|\\.])* "" " | # Inside double quoted triple strings
68
69
\#[^\n]*(\n|$) | # Comment.
70
"(?!"") ([^"\\]|\\.)*" | # Inside double quoted strings.
0 commit comments