Skip to content

Commit

Permalink
Fix paragraphNumbers option
Browse files Browse the repository at this point in the history
  • Loading branch information
ertrzyiks committed Jan 4, 2025
1 parent 34d924a commit acf1b67
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ class TailwindRenderer extends marked.Renderer {
this.paragraphIndex = paragraphNumbers ? 0 : -1;
}
protected resetParagraphIndex() {
if (this.paragraphIndex === -1) {
return;
}

this.paragraphIndex = 0;
}
heading({ tokens, depth }: Tokens.Heading) {
Expand Down

0 comments on commit acf1b67

Please sign in to comment.