SVG self closing elements are wrongly nested
Using Harlowe 3.3.1.
This is the source SVG:
<svg
viewBox="0 0 94.651688 126.23232"
version="1.1"
id="svg5"
xmlns="http://www.w3.org/2000/svg">
<defs
id="defs2" />
<g
id="layer1"
transform="translate(-59.480611,-14.061264)">
<g
id="g455"
transform="translate(-34.419355,-8.516129)">
<rect
style="fill:#ff6600;stroke:#000000;stroke-width:0.763481"
id="rect238"
width="93.888199"
height="125.46884"
x="94.281708"
y="22.959133" />
<path
style="fill:#ff6600;stroke:#000000;stroke-width:0.264583"
id="path292"
d="M 43.290322,56.064515 26.495427,43.331618 6.4850875,49.948381 13.404883,30.040804 0.92843372,13.054533 21.999999,13.48387 34.299468,-3.630985 l 6.103147,20.172922 20.07794,6.408709 -17.299613,12.038213 z"
transform="translate(108.22581,78.419355)" />
<circle
style="fill:#ff6600;stroke:#000000;stroke-width:0.264583"
id="path184"
cx="156.12904"
cy="49.322578"
r="15.258064" />
</g>
</g>
</svg>
This is the generated code (beautified for readability):
<svg viewBox="0 0 94.651688 126.23232" version="1.1" id="svg5"
xmlns="http://www.w3.org/2000/svg" data-raw="">
<defs id="defs2" data-raw="">
<g id="layer1" transform="translate(-59.480611,-14.061264)" data-raw="">
<g id="g455" transform="translate(-34.419355,-8.516129)" data-raw="">
<rect style="fill:#ff6600;stroke:#000000;stroke-width:0.763481" id="rect238" width="93.888199" height="125.46884" x="94.281708" y="22.959133" data-raw="">
<path style="fill:#ff6600;stroke:#000000;stroke-width:0.264583" id="path292" d="M 43.290322,56.064515 26.495427,43.331618 6.4850875,49.948381 13.404883,30.040804 0.92843372,13.054533 21.999999,13.48387 34.299468,-3.630985 l 6.103147,20.172922 20.07794,6.408709 -17.299613,12.038213 z" transform="translate(108.22581,78.419355)" data-raw="">
<circle style="fill:#ff6600;stroke:#000000;stroke-width:0.264583" id="path184" cx="156.12904" cy="49.322578" r="15.258064" data-raw=""></circle>
</path>
</rect>
</g>
</g>
</defs>
</svg>
This may be caused by self closing tags confusing harlowe, because if I replace them with the long notation (for example changing <defs id="defs2" />
to <defs id="defs2"></defs>
, same for path
, rect
and circle
elements) the image is correctly rendered.