Skip to main content
GoodFirstPicks
DashboardIssuesReposLeaderboard

GoodFirstPicks by Leaveitblank © 2026

CreatorRequest a RepoPrivacy PolicyTerms of Service
readline: processing \u2028 and \u2029 | GoodFirstPicks

readline: processing \u2028 and \u2029

nodejs/node 5 comments 1mo ago
View on GitHub
mediumopenScope: somewhat clearSkill match: maybeTest focusedNode.jsJavaScript

Why this is a good first issue

Consistency with JS RegExps needs to be implemented in readline.

AI Summary

The issue involves making `readline` consistent with JavaScript RegExps in handling `\u2028` and `\u2029` as line breaks. The main task is to modify `readline` to recognize these characters, potentially requiring an opt-in mechanism similar to RegExps. The recent commit suggests partial resolution, but clarity on the final implementation is still needed.

Issue 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 RegExps, 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);

out

Feel free to close if this is a wontfix.

GitHub Labels

help wantedreadline

Want to work on this?

Claim this issue to let others know you're working on it. You'll earn 20 points when you complete it!

Risk Flags

  • potential breaking change
  • requires regex knowledge
Loading labels...

Details

Points20 pts
Difficultymedium
Scopesomewhat clear
Skill Matchmaybe
Test Focusedyes