You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Chrome, this "test\n".split(/[\r]?\n/gi) produces:
["test", ""]
In IE11, this "test\n".split(/[\r]?\n/gi) produces:
["t", "e", "s", "t", " "]
Notes
Looks like there are a variety of issues with regular expressions in IE 11.
This seems to work in IE11 ("asdf\n" + "asdf\n" + "asdf\n").split("\n"), but I don't know if that works in all cases.
The text was updated successfully, but these errors were encountered:
jessethomson
changed the title
indent.js not working in internet explorer 11
indent.js splits newlines incorrectly in internet explorer 11
Apr 23, 2020
Problem
indent.js not working in internet explorer 11 due to the way lines are split. Specifically, the following line does not work correctly:
indent.js/src/indent.js
Line 463 in 033b5ed
Example
In Chrome, this
"test\n".split(/[\r]?\n/gi)
produces:In IE11, this
"test\n".split(/[\r]?\n/gi)
produces:Notes
Looks like there are a variety of issues with regular expressions in IE 11.
This seems to work in IE11
("asdf\n" + "asdf\n" + "asdf\n").split("\n")
, but I don't know if that works in all cases.The text was updated successfully, but these errors were encountered: