diff --git a/src/element/textElement.ts b/src/element/textElement.ts index b038294a5..4b0cdd5fc 100644 --- a/src/element/textElement.ts +++ b/src/element/textElement.ts @@ -461,7 +461,7 @@ export const wrapText = (text: string, font: FontString, maxWidth: number) => { const push = (str: string) => { if (str.trim()) { - lines.push(str); + lines.push(str.trim()); } };