-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Open
Labels
help wantedIssues that need assistance from volunteers or PRs that need help to proceed.Issues that need assistance from volunteers or PRs that need help to proceed.readlineIssues and PRs related to the built-in readline module.Issues and PRs related to the built-in readline module.
Description
Not sure if we should fix, document, or ignore this and if it has been discussed, so to be on the safe side.
Currently, \u2028
and \u2029
are considered as line breaks by JavaScript RegExp
s, while they are ignored by the readline
:
'use strict';
const fs = require('fs');
const readline = require('readline');
const str = '123\n456\r123\u{2028}456\u{2029}789';
console.log(str.split(/^/mu));
fs.writeFileSync('readline-test.txt', str, 'utf8');
const rl = readline.createInterface({
input: fs.createReadStream('readline-test.txt', 'utf8'),
crlfDelay: Infinity,
});
rl.on('line', console.log);
Feel free to close if this is a wontfix.
lingvoboard
Metadata
Metadata
Assignees
Labels
help wantedIssues that need assistance from volunteers or PRs that need help to proceed.Issues that need assistance from volunteers or PRs that need help to proceed.readlineIssues and PRs related to the built-in readline module.Issues and PRs related to the built-in readline module.