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

Clear existing content between start/end tags before injection #3

Merged
merged 1 commit into from
Jul 3, 2014

Conversation

DaftMonk
Copy link
Contributor

Thanks for the great work on this task, its very helpful.

I ran into an issue where if you delete a file that was injected, the injector will not clear the left over reference the next time it's run if it can't match any files to inject.

In other words, if I have

 <!-- injector:js -->
 <script src="script.js">
 <!-- endinjector -->   

And i delete the script.js file, the next time the task runs it won't match any files to be injected, so it wont delete the incorrect script tag.

This PR fixes this by clearing the content between all start and the end tags before injecting files.

@joakimbeng
Copy link
Member

Nice, thanks!

joakimbeng added a commit that referenced this pull request Jul 3, 2014
Clear existing content between start/end tags before injection
@joakimbeng joakimbeng merged commit 7ff1274 into klei:master Jul 3, 2014
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.

2 participants