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

Check possible minify HTML space regression #8759

Closed
bep opened this issue Jul 15, 2021 · 5 comments
Closed

Check possible minify HTML space regression #8759

bep opened this issue Jul 15, 2021 · 5 comments
Assignees
Milestone

Comments

@bep
Copy link
Member

bep commented Jul 15, 2021

See https://discourse.gohugo.io/t/change-how-spaces-are-handled/33835

@bep bep added the Bug label Jul 15, 2021
@bep bep self-assigned this Jul 15, 2021
@bep bep added this to the v0.86 milestone Jul 15, 2021
@bep
Copy link
Member Author

bep commented Jul 15, 2021

See tdewolff/minify#427

bep added a commit to bep/hugo that referenced this issue Jul 15, 2021
@bep bep mentioned this issue Jul 15, 2021
@bep
Copy link
Member Author

bep commented Jul 16, 2021

Thinking about this, I suggest that we switch to keepWhitespace = true as default, I have tested it and, while not perfect, it doesn't look too bad. It mostly keeps vertical space (multiple linkebreaks are still collapsed), which I guess also makes the source more readable + whitespace is easily compressed by gzip.

What do you think, @jmooring @richtera and gang? Note that I still think the upstream bug needs to be fixed, but by keepWhitespace = true we're at least defaulting to a working state.

@richtera
Copy link
Contributor

I have added that flag as an override to my builds, and it does look correct. Actually have not found exactly where it doesn’t do the right thing. So I think it would be a good solution for now

@jmooring
Copy link
Member

Closing. We addressed this with #8771, and the underlying issue (tdewolff/minify#427) has been resolved.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants