From 05ba62deb68d1a0fb558c2672e48d26db617b6bc Mon Sep 17 00:00:00 2001 From: u4aew Date: Fri, 8 Nov 2024 14:53:45 +0300 Subject: [PATCH] feat(lists): added input rule for ordered lists with parenthesis (#461) --- src/extensions/markdown/Lists/inputrules.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/extensions/markdown/Lists/inputrules.ts b/src/extensions/markdown/Lists/inputrules.ts index 638b776e..9711ae5d 100644 --- a/src/extensions/markdown/Lists/inputrules.ts +++ b/src/extensions/markdown/Lists/inputrules.ts @@ -26,13 +26,16 @@ export const ListsInputRulesExtension: ExtensionWithOptions ({[ListsAttr.Order]: Number(match[1])}), + (match) => ({ + [ListsAttr.Order]: Number(match[1]), + [ListsAttr.Markup]: match[2], + }), (match, node) => node.childCount + node.attrs[ListsAttr.Order] === Number(match[1]), ); }