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

identical elements with identical ID values in input defs should result in only one copy in output def #14

Open
u0421793 opened this issue Aug 24, 2020 · 0 comments

Comments

@u0421793
Copy link

I have three separate svg files each referring to their own same and identical g='blah-common' in their respective defs, this is so that each works standalone and can be easily previewed.

When put through svgstore-cli the result is of course three copies of that g element and contents in the new defs, each with an id value of 'blah-common', which technically becomes invalid xml now (duplicate ID value!). Is there a way of doing a quick compare to see if an element with duplicated IDs are indeed identical (ie, their entire child tree) and if so, only use it once.

Or, alternatively, cripple the extra duplicated IDs (and any child duplicated ids) somehow so that although they're there, wasted, they don't cause the XML to be invalid.

Not sure what you should do if you get a duplicate ID but the content of the element is different. But that's a different problem.

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

No branches or pull requests

1 participant