Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix prefixIds plugin to properly handle url()s in style="..." (#1592)
`prefixIds` plugin currently breaks url()-links inside `style` attributes: ```javascript optimize( `<g style="fill:url(#brush-id);stroke:url(#pen-id)"/>`, { plugins: ['prefixIds'] } ).data ``` will generate `<g style=""/>`. Seems like `prefixIds` assumes that attribute's whole value might be `url()`, but this is not the case for the `style` attribute. This fix solves the issue by preserving all attribute's content other than #id inside url(). It also adds some more tests for the `prefixIds` plugin.
- Loading branch information