fix: multiple \n when editing

This commit is contained in:
Julien Calixte
2025-11-11 18:01:48 +01:00
parent 7b04ce8e0e
commit f98ac48fe4

View File

@@ -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)
}
</script>