minify icon indicating copy to clipboard operation
minify copied to clipboard

HTML minimization: whitespace around `<li>` should not be trimmed

Open xuhdev opened this issue 5 years ago • 3 comments

The HTML minifier removes whitespace around <li> as a "blocked/undisplayed element": https://github.com/mrclay/minify/blob/258e495451c03adf57e1df81c2f0ef0c25b2f40d/lib/Minify/HTML.php#L136

However, <li> is commonly modified to be inline (e.g., "The Whitespace Issue" section here, tag clouds in WordPress themes Twenty Twelve and Twenty Seventeen). This often breaks the rendering of <li> elements.

xuhdev avatar Nov 22 '18 10:11 xuhdev