Skip to content

Commit

Permalink
fix: Support rare \r line break (#35)
Browse files Browse the repository at this point in the history
* Support rare \r line break

* fixup: linting

---------

Co-authored-by: Gar <gar+gh@danger.computer>
Co-authored-by: Gar <wraithgar@github.com>
  • Loading branch information
3 people committed Apr 13, 2023
1 parent c149cf9 commit c5932e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/read.js
Expand Up @@ -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)
})

Expand Down

0 comments on commit c5932e8

Please sign in to comment.