Open JanaLEE opened 1 year ago
I remove and reinstall wyrihaximus/html-compress, the problem is fixed...
However, the order of the output HTML after minification is incorrect. The field
var vars={};
, which originally appeared end of HTML, is now placed beforeDOCTYPE
. The output HTML is as follows:var vars={};<!DOCTYPE html><!--[if lt IE 9]><html class="no-js no-svg ie lt-ie9 lt-ie8 lt-ie7" lang="en-US"> <![endif]--><!--[if IE 9]><html class="no-js no-svg ie ie9 lt-ie9 lt-ie8" lang="en-US"> <![endif]--><!--[if gt IE 9]><!--><html class="no-js no-svg" lang=en-US> <!--<![endif]--> <head><meta charset=UTF-8><meta content="" name=description> <body data-template=base.twig><header class=header><div class=wrapper><h1 class=hdr-logo role=banner></h1> <nav class=nav-main id=nav-main role=navigation></nav></div> </header> <section class=content-wrapper id=content role=main><div class=wrapper></div> </section> <footer id=footer></footer> <script>var vars={}</script>
What could be the problem?
Honestly? No clue, I'm mainly wrapping other packages to handle parts of this. The var vars={}
is still at the end tho, not sure why it also ended up at the front.
I remove and reinstall wyrihaximus/html-compress, the problem is fixed...
And this is the part that scares me, this shouldn't happen. Unless one of the dependencies also got updated at the same time.
I have no idea why that happened. Fortunately, I reinstall it and problem solved then.
No worries, it is probably a glitch, and if it happens again I'll dive into it.
Hi
I found another question, the html below
`
<div class="woocommerce-variation-price">{{{ data.variation.price_html }}}</div>
<div class="woocommerce-variation-availability">{{{ data.variation.availability_html }}}</div>
`
will be minified into
`
Hey @JanaLEE, been looking into this and it might be an upstream issue. Doing some final checks to confirm that before opening an issue there, will also tag you in it. Problem seems to be that I get the <\/div>
before I skip the minimization for it.
Hi
I tried to minify HTML using the WyriHaximus/HtmlCompress module. The original HTML is as follows:
PHP
\WyriHaximus\HtmlCompress\Factory::constructSmallest()->compress($output)
However, the order of the output HTML after minification is incorrect. The field
var vars={};
, which originally appeared end of HTML, is now placed beforeDOCTYPE
. The output HTML is as follows:What could be the problem?