mirror of
https://github.com/eliasstepanik/strudel.git
synced 2026-01-11 05:38:35 +00:00
remove slash before anchor link
This commit is contained in:
parent
dd51bd0a2f
commit
12eb361d69
@ -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[]>([]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user