Skip to content

Commit

Permalink
[Docs Site] Fix anchor link headings (#18151)
Browse files Browse the repository at this point in the history
  • Loading branch information
KianNH authored Nov 14, 2024
1 parent f4062eb commit 3ba931c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/rehype/heading-slugs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ export default function () {
const text = element.children.at(-2) as MdxTextExpression;
text.value = text.value.trimEnd();
element.children.with(-2, text);
} else {
if (!element.properties.id) {
element.properties.id = slugs.slug(toString(element));
}
}
} else {
if (!element.properties.id) {
element.properties.id = slugs.slug(toString(element));
}
}
}
Expand Down

0 comments on commit 3ba931c

Please sign in to comment.