You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
compressHTML is removing whitespace that shouldn't be #815.
There should be space between tags with significant whitespace.
<h1>
<span>span</span>
<span>span</span>
</h1>
That should become <h1><span>word</span> <span>word</span></h1> not <h1><span>word</span><span>word</span></h1>. Lot of examples like this.
html-minifier-terser has conservativeCollapse option that show how to do it. Or make everything like <h1> <span>word</span> <span>word</span> </h1> to be safe and solve this everywhere.
What version of
@astrojs/compiler
are you using?2.7.1
What package manager are you using?
pnpm
What operating system are you using?
linux
Describe the Bug
compressHTML is removing whitespace that shouldn't be #815.
There should be space between tags with significant whitespace.
That should become
<h1><span>word</span> <span>word</span></h1>
not<h1><span>word</span><span>word</span></h1>
. Lot of examples like this.html-minifier-terser has
conservativeCollapse
option that show how to do it. Or make everything like<h1> <span>word</span> <span>word</span> </h1>
to be safe and solve this everywhere.Link to Minimal Reproducible Example
https://gitlab.com/wackbyte/astro-compress-html-removes-whitespace
The text was updated successfully, but these errors were encountered: