From f98ac48fe443d2c9d2fd98118d982700fcf08c89 Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Tue, 11 Nov 2025 18:01:48 +0100 Subject: [PATCH] fix: multiple \n when editing --- src/modules/note/components/EditNote.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/note/components/EditNote.vue b/src/modules/note/components/EditNote.vue index f7a8fec..fc9969a 100644 --- a/src/modules/note/components/EditNote.vue +++ b/src/modules/note/components/EditNote.vue @@ -4,11 +4,12 @@ defineProps<{ }>() const emits = defineEmits<{ - (event: 'update:modelValue', payload: string): void + (event: "update:modelValue", payload: string): void }>() const handleInput = (input: string) => { - emits('update:modelValue', input) + const sanitizedInput = input.replace(/\n{3,}/g, "\n\n") + emits("update:modelValue", sanitizedInput) }