Skip to content

Commit

Permalink
fix: correct ordered list start number rendering (#457)
Browse files Browse the repository at this point in the history
  • Loading branch information
dribble-njr authored Dec 8, 2024
1 parent c52593b commit 1e887fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,11 @@ export function initRenderer(opts: IOpts) {
return styledContent(`listitem`, `${prefix}${content}`, `li`)
},

list({ ordered, items }: Tokens.List): string {
list({ ordered, items, start = 1 }: Tokens.List): string {
const listItems = []
for (let i = 0; i < items.length; i++) {
isOrdered = ordered
listIndex = i
listIndex = Number(start) + i - 1
const item = items[i]
listItems.push(this.listitem(item))
}
Expand Down

0 comments on commit 1e887fe

Please sign in to comment.