Skip to content

Commit

Permalink
fix: ordered list numbering
Browse files Browse the repository at this point in the history
  • Loading branch information
cwooldridge1 authored Dec 26, 2024
1 parent 69f4f72 commit b3565aa
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -98,6 +98,7 @@ export const remarkDefaultElementRules: RemarkElementRules = {
),
indent,
listStyleType,
listStart: index + 1,
type: options.editor.getType({ key: 'p' }),
});

Expand Down

0 comments on commit b3565aa

Please sign in to comment.