JuliaFormatter.jl icon indicating copy to clipboard operation
JuliaFormatter.jl copied to clipboard

HTML inside Markdown not formatted correctly, leads to errors.

Open cmichelenstrofer opened this issue 3 years ago • 2 comments

Specifically, it removes and adds new lines in seemingly random places. Removing the lines can break some of the desired behavior. It seems like the formatter is just not aware of HTML.

For instance, in the example below (a GitHub README.md), after removing the blank line the heading doesn't render as a heading anymore.

Screenshot 2022-12-18 23 36 24

Also, the format off/on I tried in that example did not work.

cmichelenstrofer avatar Dec 19 '22 06:12 cmichelenstrofer

anything outside of code blocks in a format file is done by CommonMark.jl, so this is like a bug with it.

domluna avatar Dec 20 '22 17:12 domluna

Thanks! Maybe it's related to MichaelHatherly/CommonMark.jl#42. I'll investigate later.

cmichelenstrofer avatar Dec 20 '22 17:12 cmichelenstrofer