mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-08 13:54:54 +00:00
Issue rendering tables with leading paragraph #325
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 @olipo186 on GitHub (Sep 23, 2019).
Hi,
I noticed this different while rendering some markdown markup into HTML. Is this expected behavior? Shouldn't tables be rendered properly regardless of whether there's text just before it or not?
I'm converting using the following;
Test case 1: No extra line break added
Input
Output
Test case 2: Extra line break added
Input
Output
@xoofx commented on GitHub (Sep 23, 2019):
It is the behavior of GitHub Flavored Markdown as well, check on babelmark here
Here is the text:
Hello world
And you can see that it doesn't show up correctly, while
Hello world
is working.
Let's say that it is by design 😅
The underlying story is that it complicates a lot the parsing story if we support attached paragraph, because under the hood, Markdig is actually working on a paragraph level to detect a table, and it would likely complicate the parsing to do it in the middle.
@olipo186 commented on GitHub (Oct 24, 2019):
I agree with your conclusion. This seems to be an edge case that is handled slightly different by various markdown parsers. Most of the parsers seem to align with the behavior of Markdig however, and I haven't been able to find any "spec" for the markdown table syntax that covers this.
Thanks for your reply @xoofx, feel free to close the issue!
@ecooke-macu commented on GitHub (Jul 19, 2023):
Now that github renders the tables with a leading line with text as expected, a table underneath it, is this something worth looking into?
For example
Markdig rendered output:
Github:
sometext