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:
parent
9be998efd1
commit
d7120fad45
|
@ -161,6 +161,7 @@ def mince_js_fileobj(fileobj):
|
||||||
next_content = content[-1] + next_char
|
next_content = content[-1] + next_char
|
||||||
content = content[:-1]
|
content = content[:-1]
|
||||||
cpos -= 1
|
cpos -= 1
|
||||||
|
char = next_char
|
||||||
except StopIteration:
|
except StopIteration:
|
||||||
pass
|
pass
|
||||||
elif is_string_literal_dq(state):
|
elif is_string_literal_dq(state):
|
||||||
|
@ -191,6 +192,7 @@ def mince_js_fileobj(fileobj):
|
||||||
suc_state = JsBlockType.CODE_BLOCK
|
suc_state = JsBlockType.CODE_BLOCK
|
||||||
content = content + next_char
|
content = content + next_char
|
||||||
cpos += 1
|
cpos += 1
|
||||||
|
char = next_char
|
||||||
except StopIteration:
|
except StopIteration:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue