Make sure error token set the new_line flag when necessary

Should solve #855
This commit is contained in:
Matthias Bussonnier
2017-02-13 10:19:55 -08:00
committed by Dave Halter
parent 5513f72987
commit 0fb386d7e2

View File

@@ -233,6 +233,8 @@ def generate_tokens(readline, use_exact_op_types=False):
if not line:
if contstr:
yield TokenInfo(ERRORTOKEN, contstr, contstr_start, prefix)
if contstr.endswith('\n'):
new_line = True
break
lnum += 1