diff --git a/src/lib/markdown.ts b/src/lib/markdown.ts index 59bffc8..ea0b6bb 100644 --- a/src/lib/markdown.ts +++ b/src/lib/markdown.ts @@ -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) {