Skip to content

Don't strip any whitespaces from SVG text/tspan nodes

Alvin Wong requested to merge alvinwong/krita:alvin/svg-keep-whitespace into master

white-space: pre and other white-space modes rely on whitespaces in the text being preserved as-is. Stripping any whitespaces will alter how the text is displayed, so don't do that. This fixes text like:

<text style="white-space:pre"><tspan>After <tspan
style="font-style:italic">italic</tspan>
</tspan><tspan>there is a line break</tspan></text>

@dkazakov wdyt, since you implemented most of this in bde1adee?

And CC @woltherav for 4b447ed9

Relates to !1849 (merged)

Edited by Alvin Wong

Merge request reports