From ece631b430cc6d9479d92ed92b435fcd09c6b0d0 Mon Sep 17 00:00:00 2001 From: Simonboeuf1 Date: Wed, 13 May 2020 14:30:53 +0200 Subject: [PATCH] preserve spaces in text blocks in svg export (#1587) --- src/renderer/renderElement.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/renderer/renderElement.ts b/src/renderer/renderElement.ts index a4507b06..ddbc8d9d 100644 --- a/src/renderer/renderElement.ts +++ b/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);