Open
Description
how to reproduce:
- create example html file "input.html":
<!-- It's not ok! Removes space before and after number 23 -->
<p>Before output tag text <output>23</output> after output tag text.</p>
<!-- It's ok -->
<p>Before b tag text <b>23</b> after b tag text.</p>
- run with collapseWhitespace parameter
npx html-minifier --collapse-whitespace input.html -o output.html
html result "output.html":
<!-- It's not ok! Removes space before and after number 23 --><p>Before output tag text<output>23</output>after output tag text.</p><!-- It's ok --><p>Before b tag text <b>23</b> after b tag text.</p>
reason: the "output" is not a inline tag, but is often used as a inline (for javascript).
Metadata
Metadata
Assignees
Labels
No labels