Commit 1ebfe75
committed
This is seems to be a bug with the regex use of split, blank lines are not included so the line number used for evidence don't match up.
Using a regex to do the split skips all blank lines:
lines = text.split(/\n\r?/g); //current code
This can be fixed if you instead use the regex to replace line feeds with a unique value and then a simple string to split on (not a regex).
lines = text.replace(/\n\r?/g, "$split$").split('$split$'); //fix that worked for me :)1 parent a711269 commit 1ebfe75
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| |||
0 commit comments