Skip to content

fix: Remove unused <use> elements when deleting empty symbols (issue 1765).#2051

Merged
SethFalco merged 1 commit into
svg:mainfrom
johnkenny54:removeEmptyContainers
Dec 4, 2025
Merged

fix: Remove unused <use> elements when deleting empty symbols (issue 1765).#2051
SethFalco merged 1 commit into
svg:mainfrom
johnkenny54:removeEmptyContainers

Conversation

@johnkenny54

Copy link
Copy Markdown
Contributor

When removeEmptyContainers removes a symbol referenced by <use>, the stray <use>s were being left in the SVG, though they no longer reference a valid element. This PR modifies removeEmptyContainers to also remove the dangling <use> elements.

Closes #1765, closes #1618, closes #1194.

@SethFalco SethFalco force-pushed the removeEmptyContainers branch from 26a98ea to 36a0a0a Compare December 3, 2025 16:21
@SethFalco

Copy link
Copy Markdown
Member

This looks great to me! Thank you very much for your contribution! ❤️

@SethFalco SethFalco merged commit 26e86e5 into svg:main Dec 4, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants