iest / babel-plugin-inline-svg

Babel plugin to optimise and inline svg
49 stars 15 forks source link

Update xlink:href refs on id cleanup #5

Closed amogower closed 4 years ago

amogower commented 5 years ago

Noticed that xlink:href refs weren't being updated with the new ids so have added a regex match and replacement for those.

iest commented 5 years ago

Thanks for the PR @amogower! Could you please add a test to __tests__ to verify what you've changed does the job? 🙌

amogower commented 5 years ago

@iest np, test should be in the PR now 👍

amogower commented 5 years ago

Actually found a bug with the getIds regexp being greedy so have fixed that, updated tests and also added a mask url reference regexp + replacement.

iest commented 4 years ago

@amogower Apologies for the (oops, over a year!) slow response on this one — are you using these changes in production somewhere, and are they working as expected?

I'm gonna revamp the repo soon so I'd love to pull these changes in.

iest commented 4 years ago

This work was used as part of https://github.com/iest/babel-plugin-inline-svg/pull/22 🙌