dtreeviz/utils.py: Fix ID collisions in inline_svg_images output
Inlined SVGs may have IDs which are not globally unique. Patch the tree of the inlined images and add a prefix to all IDs, to make collisions much less likely.
Please excuse my Python.
Interesting! Can you tell me what problems occurred because of this? In other words how did you know this was a problem? thanks!
I found a link to this file in a StackOverflow post and applied it to my toolchain for putting LaTeX formulas in Graphviz SVG renders... sorry if this is not useful to the project as a whole :)
I've noticed that jupyter notebooks tend not to show my SVG images except the first time you run it, not when you reload it. You think that could be because of this unique identifier thing? Can you give me a link to the StackOverflow post? I want to understand exactly what's going on. thanks
I've noticed that jupyter notebooks tend not to show my SVG images except the first time you run it, not when you reload it. You think that could be because of this unique identifier thing?
Hmm, I don't think so. The symptoms for ID collisions (which I also encountered elsewhere) is things such as styling applied to the wrong element. In this case it manifested as a wrong font in some of the SVGs embedded later in the document.
Can you give me a link to the StackOverflow post? I want to understand exactly what's going on. thanks
Sorry, I misremembered. Though I did run into dtreeviz on StackOverflow while researching my SVG troubles, the actual link to this file I found on this GitHub comment: https://github.com/ellson/MOTHBALLED-graphviz/issues/1294#issuecomment-425730041