dom-expressions icon indicating copy to clipboard operation
dom-expressions copied to clipboard

Additional HTML closing tag omission

Open intrnl opened this issue 1 year ago • 1 comments

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>)

intrnl avatar Apr 17 '23 10:04 intrnl

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.

ryansolid avatar Apr 18 '23 05:04 ryansolid