cmark
cmark copied to clipboard
Issue with rendering whitespace to commonmark
There is an issue with cmark_render_commonmark function when it gets as an input a document that has a text node with a whitespace in the beginning, it does not return a correct markdown string.
For example, the following document:
Document node -> Paragraph node -> Text node with text literal
is rendered as text\n, which is a code block.
From looking at some other implementation I see the whitespace is replaced with  . Can this applied in cmark? thanks
Another option would be to simply trim the initial whitespace.