From e1782f9dc95f2c96537db3e4590d424cac4785ae Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Sun, 21 Mar 2021 22:43:28 -0700 Subject: [PATCH] fix markdown header issue --- src/micromark-collect-headers.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/micromark-collect-headers.ts b/src/micromark-collect-headers.ts index d614cc5b4..d69a0a358 100644 --- a/src/micromark-collect-headers.ts +++ b/src/micromark-collect-headers.ts @@ -12,6 +12,7 @@ export function createMarkdownHeadersCollector() { atxHeading(node: any) { currentHeader = {}; headers.push(currentHeader); + this.buffer(); }, atxHeadingSequence(node: any) { currentHeader.depth = this.sliceSerialize(node).length; @@ -23,10 +24,10 @@ export function createMarkdownHeadersCollector() { exit: { atxHeading(node: any) { currentHeader.slug = slugger.slug(currentHeader.text); + this.resume(); this.tag(``); this.raw(currentHeader.text); this.tag(``); - // console.log(this.sliceSerialize(node)); }, } as any,