pulldown-cmark-to-cmark icon indicating copy to clipboard operation
pulldown-cmark-to-cmark copied to clipboard

End of code block sometimes not indented correctly

Open msrd0 opened this issue 9 months ago • 1 comments

When code blocks are part of lists, their three backticks need to be indented (as well as its content). When using an input like this one, pulldown-cmark produces multiple text events inside the code block, each ending with a newline. This gets rendered correctly.

However, when you accidentally remove those newlines, this crate suddenly stops indenting the end of code block correctly. It produces the content of the code block as one long line (which makes sense), adding a newline and then the end of code block without indentation.

While producing codeblock content without final newlines might not be an expected input, I feel like this crate should still indent everything correctly.

msrd0 avatar May 13 '24 13:05 msrd0