Open
Description
I'm having trouble understanding how this module works with multiline text and I feel the current behavior has a bug.
Here's an example:
const wrap = require('word-wrap')
const test = `Highlights:\n First\n Second\n Third`
result = wrap(test, {width: 80}, indent: '*');
The output I get is *Highlights:\n \n*First\n \n*Second\n \n*Third
but what I expected was *Highlights:\n\n* First\n\n* Second\n\n* Third
. Why are the spaces after a newline being included in the previous line? Is this a bug?
Metadata
Assignees
Labels
No labels