Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cut option eats newlines #23

Open
mohd-akram opened this issue Jun 14, 2017 · 2 comments
Open

cut option eats newlines #23

mohd-akram opened this issue Jun 14, 2017 · 2 comments

Comments

@mohd-akram
Copy link
Contributor

Expected:

wrap('a\n\nb', {indent: '', cut: true}) == 'a\n\nb'

Actual:

wrap('a\n\nb', {indent: '', cut: true}) == 'a\nb'

@jonschlinkert
Copy link
Owner

Does this happen with longer strings or just contrived examples?

@mohd-akram
Copy link
Contributor Author

It does, I discovered this while word-wrapping some source code which tends to have empty lines.

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

No branches or pull requests

2 participants