[Bug]: <tfoot> tag brokes the structure
v.4.0.0
Do you have an MRE?
Do you have an MRE?
html-minifier in.html -o out.html
<html lang="en">
<head>
</head>
<body>
<table>
<tbody>
<tr>
<td>
<table>
<caption>000000000000000000000000</caption>
<tbody>
<tr>
<td>11111111111111111111111</td>
</tr>
<tr>
<td>222222222222222222222222</td>
</tr>
<tr>
<td>3333333333333333333333333</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>99999999999999999999999999999999999</td>
</tr>
</tfoot>
</table>
</td>
</tr>
</tbody>
</table>
</body>
</html>
Will produce out.html with broken valid html structure:
<html lang="en">
<head>
</head>
<body>
<table>
<tbody>
<tr>
<td>
<table>
<caption>000000000000000000000000</caption>
<tbody>
<tr>
<td>11111111111111111111111</td>
</tr>
<tr>
<td>222222222222222222222222</td>
</tr>
<tr>
<td>3333333333333333333333333</td>
</tr>
</tbody>
</table></td></tr></tbody><tfoot>
<tr>
<td>99999999999999999999999999999999999</td>
</tr>
</tfoot>
</table>
``
</body>
</html>
The same BUG exist and in https://github.com/terser/html-minifier-terser
Thanks @AngelTs! This should be fixed now in version 2.1.5 of HTML Minifier Next—see e.g. the web-based version.