Skip to content
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

Asset files: search for license at the start of the file #43

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mikeartix
Copy link
Contributor

If you have a comment in the middle of your file that resembles a license comment syntax (which, from what I tested, it applies to most asset files except for twig which has slightly different syntax for comments), then the license comment doesn't get added to that file. I've stumbled upon this issue when I had {* This is HTML content *} comments in my smarty files.

The fix is very simple, I just added ^ to the comment regex so it only searches from the beginning of the file's contents.

This change only affects asset files (css, js, tpl, twig etc.) since for PHP there is a separate method for handling the license comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant