preserve spaces in text blocks in svg export (#1587)

This commit is contained in:
Simonboeuf1 2020-05-13 14:30:53 +02:00 committed by GitHub
parent 9ec43d2626
commit ece631b430
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -485,6 +485,7 @@ export function renderElementToSvg(
text.setAttribute("font-size", fontSize); text.setAttribute("font-size", fontSize);
text.setAttribute("fill", element.strokeColor); text.setAttribute("fill", element.strokeColor);
text.setAttribute("text-anchor", textAnchor); text.setAttribute("text-anchor", textAnchor);
text.setAttribute("style", "white-space: pre;");
node.appendChild(text); node.appendChild(text);
} }
svgRoot.appendChild(node); svgRoot.appendChild(node);