Skip to content

Commit 9ad667d

Browse files
fix missing underscore (#578)
Co-authored-by: zdh <935021934@qq.com>
1 parent 4493cbd commit 9ad667d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/extract-indices.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ const headers = options => (tree, file) => {
2222
tree.children.forEach(child => {
2323
if (child.type === "heading" && child.depth === 1) {
2424
if (child.children.length > 0) {
25-
mainHeader = child.children[0].value;
25+
mainHeader = child.children.map(element => element.value).join("");
2626
}
2727
}
2828
if (child.type === "heading" && child.depth === 2) {
2929
if (child.children.length > 0) {
3030
const id = child.data.id || "";
31-
const name = child.children[0].value;
31+
const name = child.children.map(element => element.value).join("");
3232
headers.push({ name, href: id });
3333
}
3434
}

0 commit comments

Comments
 (0)