mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-03 21:36:36 +00:00
How to rewrite header elements #428
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kaylumah on GitHub (Jan 24, 2021).
Hi,
I really like your library, but I am not really clear on which customization hooks I need to use, since there are a lot of hooks available. For many differnt variants, like for example the Figure extension creates custom types alongside parsers and renderers. So I am a bit lost and I thought I ask here for advise.
I think I need something like AutoIdentifiers but I am not sure.
The use case I want to do is make all headers clickable with anchors.
So
Would become
Any pointers are appreciated
@xoofx commented on GitHub (Jan 25, 2021):
Autoidentifiers will help to add an id attribute to your heading, so you can then insert your link by post-processing the document before rendering it, something like that:
@kaylumah commented on GitHub (Jan 25, 2021):
@xoofx awesome, can confirm this works, did not expect you to write the code at all, so many thanks :-)
My guess is I can do it like this, or use de BootstrapExtension as the basis to do in in a pipeline right?
@xoofx commented on GitHub (Jan 25, 2021):
Yep for example.