Bug fix: update char if loops reads another char (next_char). This avoids missing an escape character or a newline.

This commit is contained in:
Achim D. Brucker 2017-08-30 01:43:18 +01:00
parent 9be998efd1
commit d7120fad45
1 changed files with 2 additions and 0 deletions

View File

@ -161,6 +161,7 @@ def mince_js_fileobj(fileobj):
next_content = content[-1] + next_char
content = content[:-1]
cpos -= 1
char = next_char
except StopIteration:
pass
elif is_string_literal_dq(state):
@ -191,6 +192,7 @@ def mince_js_fileobj(fileobj):
suc_state = JsBlockType.CODE_BLOCK
content = content + next_char
cpos += 1
char = next_char
except StopIteration:
pass