diff --git a/frontend/src/utils/document.ts b/frontend/src/utils/document.ts index 0b219944..0cebbe03 100644 --- a/frontend/src/utils/document.ts +++ b/frontend/src/utils/document.ts @@ -5,6 +5,9 @@ export function createDocumentKey() { export function addSoftLineBreak(text: string) { return text .split("\n") - .map((line) => line + " ") + .map((line) => { + if (line.trim() === "") return ""; + else return line + " "; + }) .join("\n"); }