Skip to content

bug(commonmark) Header html tags in table cells do not round-trip or preview properly #183

@yellis

Description

@yellis

Describe the bug
Header html tags used in table header or body cells end up not previewing properly in RT mode and mangle the table upon round-trip. It works in current editor when saved to the site - renders properly.

To Reproduce

  1. MD mode, create table, add an h1 html tag in any cell around the text
  2. Go to RT mode, observe that the tag has been transformed as a literal
  3. Go back to MD mode and the table syntax is all messed up and mangled

Expected behavior
Ideally we would support header elements in table cells. The GH MD table spec does not mention it, but the current editor and on-side rendering support it. If we decide not to support it, should at least allow round-trip without destroying the table markdup.

Screenshots
demo

Desktop (please complete the following information):
Windows 11 Chrome 103

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcommonmarkRelates to commonmark round-tripping or syntax

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions