Closed terrencekhng closed 9 years ago
hmm, that's an interesting challenge. I'll try to come up with something
hi @jonschlinkert
a simpler feature would be cuttting the words longer then width, when the cut option is true:
var re = new RegExp('.{1,' + width + '}(\\s+|$)|\\S+?(\\s+|$)', 'g');
if (opts.cut) {
re = new RegExp('.{1,' + width + '}', 'g');
}
interested in a PR?
makes sense, a PR would be great. thanks!
closed via https://github.com/jonschlinkert/word-wrap/issues/9.
thanks @danilosampaio! https://github.com/jonschlinkert/word-wrap/releases/tag/1.1.0
nice! :+1:
When we meet a paragraph contains some very long words:
Should it look like this under specific width: