diff --git a/parso/python/fstring.py b/parso/python/fstring.py index 025a48c..50ee09c 100644 --- a/parso/python/fstring.py +++ b/parso/python/fstring.py @@ -144,11 +144,11 @@ def _tokenize(code, start_pos=(1, 0)): search *= 3 start += 2 - index = code.find(search) + index = code.find(search, start) if index == -1: index = len(code) expression += code[start:index] - start = index + start = index + 1 elif found == '!' and len(code) > start and code[start] == '=': # This is a python `!=` and not a conversion. expression += found diff --git a/test/failing_examples.py b/test/failing_examples.py index 7127ac3..89dc359 100644 --- a/test/failing_examples.py +++ b/test/failing_examples.py @@ -142,7 +142,7 @@ FAILING_EXAMPLES = [ # f-strings 'f"{}"', 'f"{\\}"', - #'f"{\'\\\'}"', + 'f"{\'\\\'}"', 'f"{#}"', ]