HTMLMin / Laravel-HTMLMin

A simple HTML minifier for Laravel 5, 6, 7, 8 & 9.
MIT License
1.02k stars 118 forks source link

JSMin: Unterminated RegExp : /.modal-content --> #104

Open nadyshalaby opened 6 years ago

nadyshalaby commented 6 years ago

Can't remove comments with pattern /<!--[^<>]+-->/.

I solved it by adding remove => ['/<!--[^<>]+-->/'] option in your config file config/htmlmin.php

then replacing that array using preg_replace before starting minfication process in

HTMLMin\HTMLMin\Http\Middleware\MinifyMiddleware

please consider that option it could help or if you have a better solution please tell me.

srmklive commented 6 years ago

@taekunger Thanks for pointing it out, and my apologies for not responding early. Can you open a PR for this with tests if possible?