Skip to content

Commit

Permalink
fix(theme): remove trailing # from outline (#1344)
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd authored Sep 15, 2022
1 parent 4482c50 commit f1cf1e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/theme-default/composables/outline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function getHeaders(pageOutline: DefaultTheme.Config['outline']) {
if (el.textContent && el.id) {
updatedHeaders.push({
level: Number(el.tagName[1]),
title: el.innerText.split('\n')[0],
title: el.innerText.replace(/\s+#\s*$/, ''),
link: `#${el.id}`
})
}
Expand Down

0 comments on commit f1cf1e8

Please sign in to comment.