Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removeEmptyContainers should also remove <use xlink:href="# "> #1194

Closed
JoKalliauer opened this issue Nov 19, 2019 · 2 comments · May be fixed by #2051
Closed

removeEmptyContainers should also remove <use xlink:href="# "> #1194

JoKalliauer opened this issue Nov 19, 2019 · 2 comments · May be fixed by #2051

Comments

@JoKalliauer
Copy link

JoKalliauer commented Nov 19, 2019

svgo -i Input.svg.txt -o Output.svg.txt --multipass

Maybe removeEmptyContainers should be disabled by default

removeEmptyContainers removes <symbol id="f" overflow="visible"/>, but it does not remove <use width="100%" height="100%" x="319.19" y="575.56" xlink:href="#f"/>, hence in combination with cleanupIDs use will refer to another element

Input

Input.svg.txt
Inputc

Output

Output.svg.txt
Outputc

visual Differences:

instead of the space there is a "t"

Copyright

assuming below threshold of originality

source: https://doi.org/10.1016/j.engstruct.2019.109861 (link will work in near future)

@johnkenny54
Copy link
Contributor

It looks like the visual difference is no longer present (fixed by PR #1817, which prevents the no longer valid id from being reused), but the orphaned <use> is still present, so this issue is now more or less a duplicate of issue #1765.

@JoKalliauer
Copy link
Author

confirm fix in version 3.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants