Skip to content

Commit 7a36f82

Browse files
committed
fix: toc hrefs
1 parent 59f88c4 commit 7a36f82

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/generators/jsx-ast/utils/buildBarProps.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ const extractHeading = entry => {
6868
value: heading,
6969
stability: parseInt(entry.stability?.children[0]?.data.index ?? 2),
7070
slug: data.slug,
71+
data: { id: data.slug },
7172
};
7273
};
7374

src/generators/web/ui/components/MetaBar/index.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default ({
3636
<MetaBar
3737
heading="Table of Contents"
3838
headings={{
39-
items: headings.map(({ slug, value, stability, ...heading }) => ({
39+
items: headings.map(({ value, stability, ...heading }) => ({
4040
...heading,
4141
value:
4242
stability !== 2 ? (
@@ -53,7 +53,6 @@ export default ({
5353
) : (
5454
value
5555
),
56-
data: { id: slug },
5756
})),
5857
}}
5958
items={{

0 commit comments

Comments
 (0)