Skip to content

Comments

Simplify and correct newlines replacement logic on Windows#1713

Merged
albinekb merged 1 commit intovercel:masterfrom
kvakulo:windows-new-lines
Apr 5, 2017
Merged

Simplify and correct newlines replacement logic on Windows#1713
albinekb merged 1 commit intovercel:masterfrom
kvakulo:windows-new-lines

Conversation

@kvakulo
Copy link
Contributor

@kvakulo kvakulo commented Mar 28, 2017

New lines in the .hyper.js config file are not replaced correctly on Windows.

There's an error in the replacement logic: x => x.indexOf('\r') < 0 ? x : '${x}\r'. The test should actually be x.indexOf('\r') >= 0.

However, I've simplyfied the replacement logic to make it more clear what happens.

Should be ready to merge!

@albinekb
Copy link
Contributor

albinekb commented Apr 4, 2017

Ah sweet! I saw this error when testing hyper on windows, tested this and can confirm it's working 🎉 ping @stefanivic

image

@albinekb
Copy link
Contributor

albinekb commented Apr 5, 2017

Tested by @stefanivic too, works 👌

@albinekb
Copy link
Contributor

albinekb commented Apr 5, 2017

Thanks @kvakulo 🎉

@albinekb albinekb merged commit ec18537 into vercel:master Apr 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants