Rendering anchors for markdown in templates?

I’ve got this pattern for rendering some specific headings in templates:

{{ “## Summary” | markdown | safe }}

It works fine, but does not render either the built in anchor, or my custom one in a modified anchor-link.html partial.

How can I get markdown headings with anchors directly in my template?

Thanks in advance.

It should work in the next branch i think?