mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-11 05:44:45 +00:00
[Pipe Tables Extension] Break tables with block-level structures #386
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 @hamvocke on GitHub (Jul 31, 2020).
One more deviation from the GitHub-flavored markdown specification. Again, I'm happy to put some work into this to make markdig more compliant to the GFM specification but with this one I'm completely lost where to start (and I think the preferred behavior is not obvious either).
See this example:
With a structure like this, markdig's pipe tables behave perfectly according to the specification - rendering a table followed by a blockquote:
However, this example seems to trip up markdig's pipe tables:
According to GFM, this should result in a table with two rows in the body. The second row consists of a cell with
cand another empty cell right after.dwould be a new paragraph following after the table.The pipe tables extension renders the entire table as a paragraph with the text put in verbatim, no table is generated.
I think getting a sane behavior in for this one is not that obvious. Comparing markdown parsers you can see that there's no clear consensus on how to treat this kind of case - and the GFM-specified behavior seems to be quite an outlier.
To me, the behavior shown by markdig at the moment is rather surprising. I'd have expected that at the bare minimum, I'd get a table with one body row consisting of
aandbcells.Any thoughts on how to make markdig's behavior a little more predictable or even compliant with GFM?