Rewrap
Rewrap copied to clipboard
Feature request: a mode that doesn't remove linebreaks
While Rewrap can preserve linebreaks by adding two spaces before them, there are instances where you simply don't want linebreaks to be removed at all.
As an example of a use case, I use Rewrap to nicely format Python docstrings. I need to keep some linebreaks in place, but I can't use the double space technique since my code formatter eliminates them. And I think the formatter is correct -- those spaces should not be there. And even if I could keep the formatter away from my docstrings, I would have to remember to add two spaces every time I want to properly wrap a docstring.
So my proposal is the addition of a flag to indicate that linebreaks should not be removed during wrapping. This also fits a more strict view of line wrapping as line breaking.