-
Notifications
You must be signed in to change notification settings - Fork 46
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
How to ignore copyrights in HTML from compressing? #1
Comments
The short answer is putting [] square brackets inside the comment will keep it included - and its whitespace intact.
The alternative - we can edit HTMLmin.php to keep the comment: Line 50:
|
Thanks for the hint. But isn't it possible to pass a individual structure for copyrights as a parameter? |
Its a good idea. I can add that feature no problem. For now you could just so a str_replace
|
Yes but my problem is that the copyrights are in the HTML itself, so I would replace them with a regex first and store them to a temporary variable. After the minify I would need to add them again. Therefore I would need to know where to put them. A bit complex I think. |
Sure - so the logic you want is to keep all of your html comments that contain the word copyright? We already do have a system for identifying comments you want to keep:
Can you explain why that is unworkable so i can understand? |
Hello,
my copyrights look like
How can I ignore those from compressing HTML?
The text was updated successfully, but these errors were encountered: