Skip to content

Commit 3765ca5

Browse files
committed
fix: use plain newline for <br> in turndown serialization
1 parent 53caff7 commit 3765ca5

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/lib/components/common/RichTextInput.svelte

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@
105105
}
106106
});
107107
108+
// Emit a plain newline for <br> instead of the default " \n" (Markdown hard-break)
109+
turndownService.addRule('br', {
110+
filter: 'br',
111+
replacement: () => '\n'
112+
});
113+
108114
import { onMount, onDestroy, tick, getContext } from 'svelte';
109115
import { createEventDispatcher } from 'svelte';
110116

0 commit comments

Comments
 (0)