npm i @anthonypena/marked-heading-links
import { markedHeadingLinks } from '@anthonypena/marked-heading-links';
import { Marked } from 'marked';
const marked = new Marked();
marked.use(markedHeadingLinks());
From:
## Foo
to:
<h2 id="foo">Foo<a href="#foo" class="anchor" aria-label="permalink">🔗</a></h2>
Default: ''
Default: 'anchor'
Default: '🔗'
Default: new Marked instance