Use correct paragraph separator for newline

0x2089(8329) is Subscript nine
0x2028(8232) is Line separator
0x2029(8233) is Paragraph separator
This commit is contained in:
Martin Carlberg 2013-09-06 20:17:25 +02:00 committed by Marijn Haverbeke
parent b998d5e22d
commit ba8da57d16

View File

@ -500,7 +500,7 @@
var start = tokPos;
var startLoc = options.onComment && options.locations && new line_loc_t;
var ch = input.charCodeAt(tokPos+=2);
while (tokPos < inputLen && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8329) {
while (tokPos < inputLen && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) {
++tokPos;
ch = input.charCodeAt(tokPos);
}
@ -857,7 +857,7 @@
}
}
} else {
if (ch === 13 || ch === 10 || ch === 8232 || ch === 8329) raise(tokStart, "Unterminated string constant");
if (ch === 13 || ch === 10 || ch === 8232 || ch === 8233) raise(tokStart, "Unterminated string constant");
out += String.fromCharCode(ch); // '\'
++tokPos;
}