Skip to content

template tag should allow arbitrary tag like tr, td, li #611

@pwang2

Description

@pwang2

See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template is valid usage of template. Tidy currently will add a <table> wrap to the tr in template. This will break the html rendering

$ echo '<template><tr><td>1</td></tr></template>' |
  tidy --show-body-only 1 --show-info 0 --indent 1
line 1 column 1 - Warning: missing </template> before <tr>
line 1 column 11 - Warning: inserting implicit <table>
line 1 column 30 - Warning: discarding unexpected </template>
line 1 column 11 - Warning: missing </table>
line 1 column 1 - Warning: missing </template>
Tidy found 5 warnings and 0 errors!

<template>
  <table>
    <tr>
      <td>
        1
      </td>
    </tr>
  </table>
</template>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions