Closed gwpl closed 1 year ago
I do not understand the problem ...
<br/>
in terms of Markdown is just an other word, so if you have short lines, and the wrapping method you chose is not keep
, then I would consider this correct behavior.
I apologize for confusion. I have bash alias mdformat --number --wrap 70
so I forgotten to mention that I use --wrap n
flag. This flag is actually one of main reasons I use mdformat. However I would love it to respect <br>
or <br/>
at the end of lines as clear indicator that this end of line should be preserved and is intentional.
I'd recommend to apply something like this:
sed -E -e 's|(<br/?>)([^\n])|\1\n\2|g'
I can understand what you want, but I;d not consider this incorrect behavior.
In many cases even, in Markdown, I would very much not want to be a newline after a <br>
, e.g. in tables.
I see that differentiating between contexts (i.e. different treatment for quotes and paragraphs, and different for tables) would introduce complexity into codebase of formatter.
Thank you for providing table example, I haven't thought about this one!
@gwpl Can this issue be closed then, perhaps?
I see that there is no easy way to fix it to solve all potential users needs , so yes, we can close it.
Describe the bug
This
becomes this:
I use new lines for readability, and
<br>
or<br/>
should be respected.Reproduce the bug
try to format snippet above with
mdformat 0.7.16
List your environment
No response