mirror of
https://codeberg.org/uzu/strudel
synced 2026-09-05 14:58:03 -04:00
remove slash before anchor link
This commit is contained in:
@@ -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[]>([]);
|
||||
|
||||
Reference in New Issue
Block a user