mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-03 21:36:36 +00:00
ToHtml incorrectly bunches up separate paragraph in previous <li> #616
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @achobanov on GitHub (Aug 16, 2023).
Environment
Code
Problem
Using
Markdown.ToHtmlreturns incorrect result - the last list-item element consumes the next paragraph, which obviously results in wrong formatting in output text:Source:
Result:
Steps to reproduce
html.txt
markdown.txt
@xoofx commented on GitHub (Aug 21, 2023):
This is expected because of this spec line (I believe, It has been 7+ years that I haven't checked the specs in details, but there are also many other rules with blank lines and list)
You can verify also on babelmark here that all other CommonMark implementations are showing the same behavior.
@achobanov commented on GitHub (Aug 22, 2023):
@xoofx Thanks for the replay. You are probably correct, since I never read the specs. However this does not resolve me problem. How would you suggest I should separate the list from the following paragraph? If the list itself can include anything then there must be something like a closing tag, because it would mean that if there is a list at the start of the text, all other text will be concatenated with the last list item.
@achobanov commented on GitHub (Aug 22, 2023):
TBH I fail to see how this spec makes sense.
@MihaZupan commented on GitHub (Aug 22, 2023):
Avoid the indentation on the following paragraph.
Consider https://babelmark.github.io/?text=%2B+A%0A%2B+B%0A%0AParagraph+1%0A%0A%2B+C%0A%2B+D%0A%0A++++Paragraph+2
@achobanov commented on GitHub (Aug 22, 2023):
@MihaZupan oh it's the indentation. I understand now, thanks