mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-03 21:36:36 +00:00
Hyphen on a new line doesn't return correct html #480
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 @conceptworld on GitHub (Aug 11, 2021).
If I send the following plain text to Markdown.ToHtml:
First line\nSecond line\n-
(Notice that there is single hyphen in a new line above)
Then the method returns
<h2>First lineSecond line</h2>
There are no <br> for new lines and h2 is applied to all the lines above the hyphen.
This is a major issue as many users use hyphens for simple demarcation.
Also I don't think single hyphen should work this way. 2 or 3 hyphens should result in markdown formatting.
Thanks.
@xoofx commented on GitHub (Aug 11, 2021):
All CommonMark implementation should follow the same behavior (unless we broke something recently in markdig) as shown on babelmark
This is the specs we are following https://spec.commonmark.org/0.29/#thematic-breaks