Open AndriyGo opened 5 years ago
+1
@onebelarusianguy you might want to try the latest version.
I can not reproduce it in my fork and also not in the original project:
@DanielRuf correct, but if you'd use closed tags </div></body></html>
in template file like footer.php, minifier just skip them which lead to invalid markup. But I already solved this issue wrapping closed tags in <!-- htmlmin:ignore -->
construction.
In my opinion the htmlmin:ignore
comment to ignore such markup is the correct approach for this case.
There were similar issues about this and that is a valid solution.
Here is a test case:
When I minify it with
includeAutoGeneratedTags
set tofalse
, I get the following output<!doctype html><div><header></header></div>
. As you can see, a closing</div>
is added. It is a huge problem when minifying template files.In case it is relevant, here are all the options which I have (although I did try to change them and they did not influence current behaviour with
div
):I thought that #540 was supposed to add an option to remove such behavior. Is there any other way yo turn off such additions of closing tags?