You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
Shouldn't it return *Highlights:\n* First\n* Second\n* Third? Why would it add more line breaks to lines that are already below a width of 80? In fact, that is what it does if there's not a space after the newline - seems like a bug to behave this way when there's a space. Maybe there should be an option to trim each line; I think the current trim just does the whole thing.
Other than that, there are also cases where it's desirable to have the indent added on blank lines (for example, when you have "\n\n" in the source text).
korexus
added a commit
to korexus/word-wrap
that referenced
this issue
Nov 20, 2024
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:
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?The text was updated successfully, but these errors were encountered: