Closed ianobermiller closed 2 years ago
Thanks for the PR! It works great for base64 encoded images, but it breaks for other encodings, e.g. data:image/svg+xml;utf8
I think the point is that we don't need the "url(" prefix and the trailing ")"
I'll prepare a fix for that.
To be fair, I just realized that it wasn't even supported properly :sweat_smile:
I've implemented this a little different, sorry for not merging this PR. The good news is that it should work in js files as well starting from v0.30.0.
Works for me, thanks!
Make the regex for data urls simpler and work outside of CSS files. Since
'")
all have to be escaped in a data url, we can use that as an easy way to detect when it has terminated.Test Plan
testfiles/test.css
testfiles/test.js