Open nadyshalaby opened 6 years ago
Can't remove comments with pattern /<!--[^<>]+-->/.
/<!--[^<>]+-->/
I solved it by adding remove => ['/<!--[^<>]+-->/'] option in your config file config/htmlmin.php
remove => ['/<!--[^<>]+-->/']
config/htmlmin.php
then replacing that array using preg_replace before starting minfication process in
preg_replace
HTMLMin\HTMLMin\Http\Middleware\MinifyMiddleware
please consider that option it could help or if you have a better solution please tell me.
@taekunger Thanks for pointing it out, and my apologies for not responding early. Can you open a PR for this with tests if possible?
Can't remove comments with pattern
/<!--[^<>]+-->/
.I solved it by adding
remove => ['/<!--[^<>]+-->/']
option in your config fileconfig/htmlmin.php
then replacing that array using
preg_replace
before starting minfication process inHTMLMin\HTMLMin\Http\Middleware\MinifyMiddleware
please consider that option it could help or if you have a better solution please tell me.