Closed jumale closed 2 months ago
Yeah. MarkdownRenderer
does not yet preserve everything from the input, it's main focus is on producing an equivalent document (___
is also a thematic break).
Would you want to try to make that change yourself and raise a PR? Looks like you've already found the right place where the fix should go :). I think in this case, if the node has a literal, we can use it, otherwise use ___
to not be ambiguous with lists.
Corresponding to the specification, thematic breaks can consist of 3 or more consecutive on of characters
-
,_
or*
with 0-3 leading spaces (i.e. regex^\s{0,3}[-_*]{3,}$
). This logic seem to be correct when reading Markdown - the thematic breaks are correctly recognised and captured asThematicBreak
node withliteral
parameter containing the actual value from the Markdown. However, during rendering theliteral
is dropped and replaced with static___
Expected behaviour: this markdown looks the same after parse/render
Actual behaviour: rendered transforms it into