-
Notifications
You must be signed in to change notification settings - Fork 42
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
minify_html = true
causes Major page formatting issues to pages with numbered code blocks in Zola.
#96
Comments
The generate html contains several instances of:
This attempts to close a span tag that was never opened. So html being fed into the minimizer is broken. Whatever the case for minify-html, that should be corrected. Eliding all unneccessary details, a minimal test case looks something like this.
minify-html turns it into:
The rest of the page ends up being inside a |
So is this an issue with zola then? |
Thanks for looking into this @winstonewert. By definition, it's not possible for minify-html to understand invalid HTML (nor is it its responsibility); @Jieiku if the HTML was generated, I'd suggest raising an issue with whatever tool generated the HTML. With regards to the |
Thanks @wilsonzlin , There is a ticket open at zola, hopefully somebody can figure out the cause. |
Bug Report
minify_html = true
causes Major page formatting issues to pages with numbered code blocks.This was first reported to the abridge theme: Jieiku/abridge#84
I then posted this to the zola issue tracker: getzola/zola#1942 (I am now posting it all here for completeness sake)
I implemented this in the after-dark theme and seen the same effect (pay particular attention to the footer at the bottom of the pages)
with
minify_html = false
it looks normal:Environment
Zola version: 0.16.0
I also tested 0.15.3 with the same result.
Expected Behavior
The page should look the same with or without
minify_html = true
Current Behavior
No Errors, just errors in page formatting when using
minify_html = true
Step to reproduce
git clone https://github.com/Jieiku/zola-minify-test cd zola-minify-test zola serve
open this page: http://127.0.0.1:1111/overview-code-blocks/
Notice the page section headings and page footer are all broken following the numbered code blocks.
To further confirm the issue you can removed the line numbered code blocks, then
minify_html = true
will no longer cause an issue.The text was updated successfully, but these errors were encountered: