From f65ff87e44728322417d235d2347ceca25cc6667 Mon Sep 17 00:00:00 2001 From: Hufe921 Date: Tue, 20 Aug 2024 18:44:32 +0800 Subject: [PATCH] fix: format different types of line breaks #769 --- src/editor/utils/element.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editor/utils/element.ts b/src/editor/utils/element.ts index a6e2789..e766a7d 100644 --- a/src/editor/utils/element.ts +++ b/src/editor/utils/element.ts @@ -451,7 +451,7 @@ export function formatElementList( } el = elementList[i] } - if (el.value === '\n') { + if (el.value === '\n' || el.value == '\r\n') { el.value = ZERO } if (el.type === ElementType.IMAGE || el.type === ElementType.BLOCK) {