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

Fix no word wrap bug - fixes #18 #19

Merged
merged 2 commits into from
Jul 21, 2017
Merged

Fix no word wrap bug - fixes #18 #19

merged 2 commits into from
Jul 21, 2017

Conversation

SamVerschueren
Copy link
Contributor

Apparently this use case was missed when I implemented the wordWrap option.

This one is also needed in order to solve PR #17 entirely.

index.js Outdated
@@ -131,6 +131,11 @@ function exec(str, cols, opts) {
rows.push('');
}

if (options.wordWrap === false) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I can optimise this by only executing wrapWord when the total length would exceed the number of columns. Otherwise we can just append.

@sindresorhus sindresorhus changed the title fix no word wrap bug - fixes #18 Fix no word wrap bug - fixes #18 Jul 21, 2017
@sindresorhus sindresorhus merged commit 02ad690 into master Jul 21, 2017
@sindresorhus sindresorhus deleted the wordwrap-bugfix branch July 21, 2017 11:31
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