Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional HTML closing tag omission #241

Open
intrnl opened this issue Apr 17, 2023 · 1 comment
Open

Additional HTML closing tag omission #241

intrnl opened this issue Apr 17, 2023 · 1 comment

Comments

@intrnl
Copy link
Contributor

intrnl commented Apr 17, 2023

Following this part of the HTML specification,
https://html.spec.whatwg.org/multipage/syntax.html#optional-tags

We should be able to minify this HTML code

<table>
  <thead>
    <tr>
      <td>Hello</td>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>World</td>
    </tr>
  </tbody>
<table>

to this

<table><thead><tr><td>Hello<tbody><tr><td>World</table>

This results a worthy size reduction for apps that render static tables, or display static CJK text with annotations (<ruby> tag, which has <rp> and <rt>)

@ryansolid
Copy link
Owner

I we did this optimization I just turned it off by default now and it under a config flag since some environments can't handle it. Like some testing environments completely choke on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants