Explorar o código

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

Simonboeuf1 %!s(int64=5) %!d(string=hai) anos
pai
achega
ece631b430
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      src/renderer/renderElement.ts

+ 1 - 0
src/renderer/renderElement.ts

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