I am using the rust svg crate to render an svg and I am only getting one of 2 objects. The generated svg is this:
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
<path d="M20,20 l0,50 l50,0 l0,-50 z" fill="none" stroke="black" stroke-width="3">
<path d="M10,30 l0,50 l50,0 l0,-50 z" fill="none" stroke="black" stroke-width="3"/>
</path>
</svg>
The other path which is clearly computed at an offset is nowhere to be seen. What do I do?
>Solution :
You cannot put a path inside another path since it’s not permitted content. So your svg is invalid.
This would be valid instead:
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
<path d="M20,20 l0,50 l50,0 l0,-50 z" fill="none" stroke="black" stroke-width="3"/>
<path d="M10,30 l0,50 l50,0 l0,-50 z" fill="none" stroke="black" stroke-width="3"/>
</svg>
