Closed xerc closed 2 years ago
optional/ also remove empty TAGs; /<([a-z]+)\s*>\s*<\/\1>\s*/i
External consumers might reference to a specific section using the id
attribute - finding "unused" id
s seems to be impossible in this scenario, e.g.
<img src="https://example.com/sprites.svg#some-icon">
<svg><use href="https://example.com/sprites.svg#some-icon"></use></svg>
Cleaning out SVG elements that don't have any children might happen by introducing a new removeEmptyElements($flags)
, and flags e.g. being enum constants NO_ATTRS
, NO_CHILDREN
. In any way, I think consumers of this library should explicitly use this particular behavior, I would not make it part of the default processing.
definitely ; but this ID should be in the root line of or
There are no restrictions to which nodes and how deep down in document hierarchy id
attributes are assigned.
true
INPUT
OUTPUT