Closed ygra closed 4 years ago
text.textContent
appears to still have surrounding whitespace, which seems to be rendered as well.
We could strip that, but xml:space
may need to be honored as well, if it's there.
xml:space
handling, especially when declared on an ancestor, differs wildly between browsers. Implemented like the XML spec says it should work, though (i.e. attribute values can be inherited). Results thus differ a bit from browsers in the inherited case:
Chrome:
Firefox:
e.g.:
(from the examples of the SVG spec)