Skip to content

Don't strip <thead>, <tbody> & <tfoot> tags in tables #24

@EvitanRelta

Description

@EvitanRelta

The coloring for the rows might be different if they are stripped:

Description HTML-in-markdown Rendered HTML
No <thead>, <tbody> nor <tfoot>
<table>
  <tr>
    <th>Header 1</th>
    <th>Header 2</th>
  </tr>
  <tr>
    <td>Cell 1.1</td>
    <td>Cell 1.2</td>
  </tr>
  <tr>
    <td>Cell 2.1</td>
    <td>Cell 2.2</td>
  </tr>
</table>
Header 1 Header 2
Cell 1.1 Cell 1.2
Cell 2.1 Cell 2.2
With <thead> and <tbody> only
<table>
  <thead>
    <tr>
      <th>Header 1</th>
      <th>Header 2</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Cell 1.1</td>
      <td>Cell 1.2</td>
    </tr>
    <tr>
      <td>Cell 2.1</td>
      <td>Cell 2.2</td>
    </tr>
  </tbody>
</table>
Header 1 Header 2
Cell 1.1 Cell 1.2
Cell 2.1 Cell 2.2
With <thead>, <tbody> and <tfoot>
<table>
  <thead>
    <tr>
      <th>Header 1</th>
      <th>Header 2</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Cell 1.1</td>
      <td>Cell 1.2</td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <td>Cell 2.1</td>
      <td>Cell 2.2</td>
    </tr>
  </tfoot>
</table>
Header 1 Header 2
Cell 1.1 Cell 1.2
Cell 2.1 Cell 2.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions