From b3565aabb51e5c2403181e57813fd15f82786654 Mon Sep 17 00:00:00 2001 From: Christian Wooldridge <85259389+cwooldridge1@users.noreply.github.com> Date: Thu, 26 Dec 2024 13:43:09 -0700 Subject: [PATCH] fix: ordered list numbering --- .../markdown/src/lib/remark-slate/remarkDefaultElementRules.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/markdown/src/lib/remark-slate/remarkDefaultElementRules.ts b/packages/markdown/src/lib/remark-slate/remarkDefaultElementRules.ts index 21eac86b12..96b87c0493 100644 --- a/packages/markdown/src/lib/remark-slate/remarkDefaultElementRules.ts +++ b/packages/markdown/src/lib/remark-slate/remarkDefaultElementRules.ts @@ -79,7 +79,7 @@ export const remarkDefaultElementRules: RemarkElementRules = { listItems: TElement[] = [], indent = 1 ) => { - _node.children?.forEach((listItem) => { + _node.children?.forEach((listItem, index) => { if (!listItem.children) { listItems.push({ children: remarkTransformElementChildren(listItem, options), @@ -98,6 +98,7 @@ export const remarkDefaultElementRules: RemarkElementRules = { ), indent, listStyleType, + listStart: index + 1, type: options.editor.getType({ key: 'p' }), });