1
0
mirror of https://github.com/svg/svgo.git synced 2025-09-18 19:14:33 +03:00
Files
svgo/test/plugins/cleanupIDs.18.svg
James Thomson 0e6b0ad8e5 Fix 'cleanupIDs' minify bug due to preserved IDs
Prevent 'cleanupIDs' plugin from producing a preserved ID, including one
which matches a preserved prefix, when minifying.

Closes #1158
2019-10-29 22:54:36 +03:00

24 lines
676 B
XML

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 230 120">
<defs>
<circle id="abc" fill="red" cx="60" cy="60" r="50"/>
<rect id="rect" fill="blue" x="120" y="10" width="100" height="100"/>
</defs>
<use href="#abc"/>
<use href="#rect"/>
</svg>
@@@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 230 120">
<defs>
<circle id="abc" fill="red" cx="60" cy="60" r="50"/>
<rect id="b" fill="blue" x="120" y="10" width="100" height="100"/>
</defs>
<use href="#abc"/>
<use href="#b"/>
</svg>
@@@
{"preservePrefixes": "a"}