Skip to content

Commit 5ee1edc

Browse files
committed
Remove remaining references to u2028 and u2029
1 parent 4977c9e commit 5ee1edc

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/error/syntaxError.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function highlightSourceAtLocation(source, location) {
4343
const lineNum = line.toString();
4444
const nextLineNum = (line + 1).toString();
4545
const padLen = nextLineNum.length;
46-
const lines = source.body.split(/\r\n|[\n\r\u2028\u2029]/g);
46+
const lines = source.body.split(/\r\n|[\n\r]/g);
4747
return (
4848
(line >= 2 ?
4949
lpad(padLen, prevLineNum) + ': ' + lines[line - 2] + '\n' : '') +

src/language/lexer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ function readDigits(source, start, firstCode) {
345345
/**
346346
* Reads a string token from the source file.
347347
*
348-
* "([^"\\\u000A\u000D\u2028\u2029]|(\\(u[0-9a-fA-F]{4}|["\\/bfnrt])))*"
348+
* "([^"\\\u000A\u000D]|(\\(u[0-9a-fA-F]{4}|["\\/bfnrt])))*"
349349
*/
350350
function readString(source, start) {
351351
const body = source.body;

src/language/location.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type SourceLocation = {
2323
* line and column as a SourceLocation.
2424
*/
2525
export function getLocation(source: Source, position: number): SourceLocation {
26-
const lineRegexp = /\r\n|[\n\r\u2028\u2029]/g;
26+
const lineRegexp = /\r\n|[\n\r]/g;
2727
let line = 1;
2828
let column = position + 1;
2929
let match;

0 commit comments

Comments
 (0)