Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table support differences vs. cmark-gfm #262

Open
step- opened this issue Aug 14, 2024 · 0 comments
Open

Table support differences vs. cmark-gfm #262

step- opened this issue Aug 14, 2024 · 0 comments

Comments

@step-
Copy link
Contributor

step- commented Aug 14, 2024

I noticed two differences between cmark-gfm and md2html table rendering.
I extracted all examples from test/spec-tables.txt and ran them through
cmark-gfm 0.29.0.gfm.13 and md2html 0.5.2. looking for differences.
The following two examples showed differences.

In this example cmark-gfm renders an HTML table
while md2html does not (consistently with its spec).

  1. The table cannot interrupt a paragraph.
Lorem ipsum dolor sit amet.
| Column 1 | Column 2
| ---------|---------
| foo      | bar
| baz      | qux
| quux     | quuz

In this example cmark-gfm renders

<td>`foo</td>
<td>bar`</td>

while md2html renders (consistently with its spec)

<td><code>foo     | bar</code></td>
<td></td>
  1. However pipes which are inside a code span are not recognized as cell
    boundaries.
Column 1 | Column 2
---------|---------
`foo     | bar`
baz      | qux
quux     | quuz

Since md2html is behaving per its specification I don't think the differences
can be considered defects, though, in practical terms, mark-gfm is doing a
better job with those two tables. Your thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant