mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-18 22:48:41 -09:00
Simplify and correct newlines replacement logic on Windows (#1713)
This commit is contained in:
parent
7a64c9ee8a
commit
ec18537d96
1 changed files with 1 additions and 1 deletions
|
|
@ -88,7 +88,7 @@ function exec(str) {
|
|||
// to text formatted with DOS line endings. We do this because the default
|
||||
// text editor on Windows (notepad) doesn't Deal with LF files. Still. In 2017.
|
||||
function crlfify(str) {
|
||||
return str.split('\n').map(x => x.indexOf('\r') < 0 ? x : `${x}\r`).join('\n');
|
||||
return str.replace(/\r?\n/g, '\r\n');
|
||||
}
|
||||
|
||||
exports.subscribe = function (fn) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue