We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b5df22 commit e9f23f7Copy full SHA for e9f23f7
src/services/MarkdownRenderer.ts
@@ -98,7 +98,10 @@ export class MarkdownRenderer {
98
`<a class="share-link" href="#${id}"></a>`
99
);
100
} else if (tokens[idx].hLevel === 2) {
101
- const { id } = this.saveHeading(content, this.currentTopHeading.items);
+ const { id } = this.saveHeading(
102
+ content,
103
+ this.currentTopHeading && this.currentTopHeading.items,
104
+ );
105
return (
106
`<a name="${id}"></a>` +
107
`<h${tokens[idx].hLevel} ${SECTION_ATTR}="${id}" id="${id}">` +
0 commit comments