Skip to content

Commit adda2eb

Browse files
committed
Merge pull request #192 from cscott/fix-line-numbers
Fix line numbers when the input contains multiple sequential \n characters.
2 parents 0c85706 + d8d7646 commit adda2eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/StringReader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function StringReader(text){
1313
* @type String
1414
* @private
1515
*/
16-
this._input = text.replace(/(\r|\n){1,2}/g, "\n");
16+
this._input = text.replace(/(\r\n?|\n)/g, "\n");
1717

1818

1919
/**

0 commit comments

Comments
 (0)