Closed rlivsey closed 10 years ago
Thanks for finding that. I can add a =
to the first part of the regex and a >
to the end. Presumably, though I may need to also check for a
in case you have a tag like this:
<script src=/assets/app.js data-attribute=foobar></script>
Yeah that should do the trick in most situations I'd have thought, aside from the usual problems of parsing HTML with regex!
I might re-factor to only use the regex if you have passed in a prepend path. Otherwise, we can do a straight find and replace. Let me know if you have any other ideas on how to throw a CDN URL in the asset path.
Also, please let me know if that fixed your issue. I tested a few different combinations of quotes/no-quotes and it works for me.
When HTML is minified using broccoli-htmlmin before fingerprinting, it no longer updates the asset paths.
This is because minifying removes the quotes, so
becomes:
which doesn't match the regex and so is not updated.