remove slash before anchor link

This commit is contained in:
Felix Roos 2023-02-12 20:13:59 +01:00
parent dd51bd0a2f
commit 12eb361d69

View File

@ -12,6 +12,8 @@ const TableOfContents: FunctionalComponent<{ headings: MarkdownHeading[]; curren
headings = [],
currentPage,
}) => {
// remove slash before #
currentPage = currentPage.endsWith('/') ? currentPage.slice(0, -1) : currentPage;
const toc = useRef<any>();
const onThisPageID = 'on-this-page-heading';
const itemOffsets = useRef<ItemOffsets[]>([]);