Skip to content

Commit

Permalink
Fix excessive line break (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
devleejb committed Sep 18, 2024
1 parent 0a75db5 commit 12f4340
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/src/utils/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

0 comments on commit 12f4340

Please sign in to comment.