html-minifier icon indicating copy to clipboard operation
html-minifier copied to clipboard

Space removed from between inline elements

Open StreamedLine opened this issue 3 years ago • 1 comments

(comment edited for clarity) Hi,

My issue: space getting removed from between spans if span contains <%= someVar %>

To reproduce: https://kangax.github.io/html-minifier/ with only Collapse-Whitespace and HTML5 selected

<span></span> <span></span> -> space doesn't get removed <span><%= str %></span> <span></span> -> becomes <span><%= str %></span><span></span>

Is this a bug or am I missing something?

Much thanks! David

StreamedLine avatar Aug 22 '22 21:08 StreamedLine

Does this still persist?

AFAIK think this used to be an issue but was fixed in HTML Minifier Terser (it’s also not an issue in HTML Minifier Next—maintained fork).

j9t avatar Sep 27 '25 09:09 j9t