mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-03 21:36:36 +00:00
Extra space after list item is placing contents in code block #680
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 @Matt-Scheetz on GitHub (Jun 5, 2024).
Rendering LLM output (gpt-4o) and I've observed the contents after the header for a numbered list item is getting placed in a code block (See content after 10):

Looking at the raw text and I see that there is an extra space between the Numbered header and the content

As the images states there are 4 spaces after 10 and 3 spaces after all other numbered headers.
When I pasted the raw text to have it rendered and remove the extra space, the text renders without the code block:

Using Markdig v 0.36.2
@xoofx commented on GitHub (Jun 6, 2024):
There is not much we can do. Their Markdown output is invalid CommonMark, as 4 spaces will always result in a code block as per the spec here.
You can try it here on GitHub and it will be the same:
Will give you this, similar to markdig: