Skip to content

Commit 2512852

Browse files
committed
Fix table of contents in cookbook page
Somewhere along the line, the Markdown renderer stopped putting this comment at the beginning of the line.
1 parent 943e11d commit 2512852

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/buildDocs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ async function render(markdownFile, head, tail, basePath) {
121121

122122
const renderer = new CustomRenderer();
123123
let htmlText = _head + marked.parse(markdownText, { renderer }) + _tail;
124-
htmlText = htmlText.replace(/^<!-- toc -->$/m, () => renderer.renderTOC());
124+
htmlText = htmlText.replace(/<!-- toc -->$/m, () => renderer.renderTOC());
125125

126126
const htmlFile = path.resolve('../out/docs', markdownFile.replace(/\.md$/, '') + '.html');
127127
console.log(`${markdownFile} => ${htmlFile}`);

0 commit comments

Comments
 (0)