docs: fix anchor links (#1845)

This commit is contained in:
Marvin Hagemeister
2023-10-04 10:07:09 +02:00
committed by GitHub
parent aca645996c
commit bc415f6d04
2 changed files with 17 additions and 1 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ class DefaultRenderer extends Marked.Renderer {
slugger: Marked.Slugger,
): string {
const slug = slugger.slug(raw);
return `<h${level} id="${slug}"><a class="anchor" aria-hidden="true" tabindex="-1" href="#${slug}">#</a>${text}</h${level}>`;
return `<h${level} id="${slug}"><a class="md-anchor" tabindex="-1" href="#${slug}">${text}<span aria-hidden="true">#</span></a></h${level}>`;
}
link(href: string, title: string | null, text: string) {