From c5932e8d223990dd65a46226f560768c430d1888 Mon Sep 17 00:00:00 2001 From: Nik Date: Fri, 14 Apr 2023 04:09:14 +1200 Subject: [PATCH] fix: Support rare \r line break (#35) * Support rare \r line break * fixup: linting --------- Co-authored-by: Gar Co-authored-by: Gar --- lib/read.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/read.js b/lib/read.js index 2405396..92ed415 100644 --- a/lib/read.js +++ b/lib/read.js @@ -70,7 +70,7 @@ module.exports = async function read ({ } done() // truncate the \n at the end. - const res = line.replace(/\r?\n$/, '') || def || '' + const res = line.replace(/\r?\n?$/, '') || def || '' return resolve(res) })