Skip to content

Heading immediately following a table is being rendered in the table element #1467

Closed
@Thomas-James-Rose

Description

@Thomas-James-Rose

Describe the bug
I have some Markdown that contains a table immediately followed by a heading on a new line. The subsequent heading is being rendered as part of the table.

To Reproduce
Steps to reproduce the behaviour:

Markdown Sample:

| Heading | Description |
| ----------- | ----- |
| Heading 1 | Some description | 
| Heading 2 | Some other description |
## A Title that is not a part of the table

HTML output:

<table>
  <thead>
    <tr>
      <th>Heading</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Heading 1</td>
      <td>Some description</td>
    </tr>
    <tr>
      <td>Heading 2</td>
      <td>Some other description</td>
    </tr>
    <tr>
      <td>## A title that is not a part of the table</td>
      <td></td>
    </tr>
  </tbody>
</table>

Demo:
Marked Demo

Expected behaviour
The heading should be rendered separately from the table.

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions