Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whitespace around '<li>' needs to be preserved but removed #273

Closed
superpoincare opened this issue Sep 27, 2020 · 2 comments · Fixed by #353
Closed

Whitespace around '<li>' needs to be preserved but removed #273

superpoincare opened this issue Sep 27, 2020 · 2 comments · Fixed by #353
Assignees
Labels
C: Minify enhancement New feature or request S: GH
Milestone

Comments

@superpoincare
Copy link

superpoincare commented Sep 27, 2020

There's a bug in

mrclay/minify#643

which hasn't been fixed by them as they don't probably consider it a bug.

But IMO, the whitespace inside </li> <li needs to be preserved.

There are workarounds but it's better to fix it in HTML itself.

@mavas84 mavas84 added the enhancement New feature or request label Sep 28, 2020
@mavas84
Copy link
Contributor

mavas84 commented Sep 28, 2020

Hello @vijayaraghavanramanan

Thank you for taking the time to report this and to create the issue.
the devs are going to run the tests on this and we'll get back to you as soon as the tests are done.
Thanks!

@maxicus
Copy link
Contributor

maxicus commented Mar 26, 2021

@vijayaraghavanramanan I agree with @picasticks that minify library should not remove spaces around block tags, otherwise we will end up with not removing it for any tag because someone used it as inline-block.

Unfortunately we don't live in ideal world and you are right - li is still often used in inline-block mode.
And considering it doesn't harm a lot, 2 bytes per quite rarely used tag, it's fine to add that workaround.

cssjoe added a commit that referenced this issue Mar 26, 2021
dont remove spaces around <li> tags since it's often inline-block, fixes #273
@cssjoe cssjoe added this to the 2.1.2 milestone Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Minify enhancement New feature or request S: GH
Projects
None yet
4 participants