Skip to content

Trailing whitespace at the end of table delimiter row breaks table rendering #2196

@jldec

Description

@jldec

Marked version:
3.0.0 and later

Describe the bug
This may be due to GFM tables being underspecified, but the 3.0 marked upgrade broke quite a few existing tables in my markdown corpus because table delimiter rows had trailing whitespace. The output renders the text with pipes instead of HTML tables.

<p>||| 
|-|-| 
|cell1|cell2|</p>

Removing the whitespace resolved the issue, but this may be challenging in some upgrade scenarios.

Other table rows with trailing whitespace do not cause this issue, just the delimiter row.

To Reproduce
Note: Markdown line 2 below has a trailing space.

|||
|-|-| 
|cell1|cell2|

Dingus

Expected behavior
Trailing whitespace on tables should be ignored or at least handled consistently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    L2 - annoyingSimilar to L1 - broken but there is a known workaround available for the issuecategory: tablesreleased

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions