Skip to content

Table support differences vs. cmark-gfm #262

@step-

Description

@step-

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions