This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mitar
Recipients mitar
Date 2019-06-28.18:04:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1561745091.45.0.280040726581.issue37442@roundup.psfhosted.org>
In-reply-to
Content
Inside text elements both in HTML and SVG white-space is significant and introduces differences in how things are rendered. By default in general all white-space is collapsed into one space and then this is rendered, adding additional text content.

I observed this while working with SVG which can have content like:

<text><tspan>foo</tspan><tspan>bar</tspan></text>

After pretty-printing it with minidom, and white-space collapsing, the following is what is input to SVG rendering:

<text> <tspan>foo</tspan> <tspan>bar</tspan> </text>

And space between "foo" and "bar" is now visible and while before it was one word to the user, now it is shown as two.

Related issue: https://github.com/mozman/svgwrite/issues/58

I think pretty-printing not add whitespace inside text elements.
History
Date User Action Args
2019-06-28 18:04:51mitarsetrecipients: + mitar
2019-06-28 18:04:51mitarsetmessageid: <1561745091.45.0.280040726581.issue37442@roundup.psfhosted.org>
2019-06-28 18:04:51mitarlinkissue37442 messages
2019-06-28 18:04:50mitarcreate