mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-03 21:36:36 +00:00
[PR #68] Make ContainerBlock's children public #801
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?
Original Pull Request: https://github.com/xoofx/markdig/pull/68
State: closed
Merged: No
I need to render anchor links for every header in the page. Since headers are not guaranteed to be unique in the id/name value I include also the name of the parent header.
For example:
## heading 1### heading 1.1should result in
<h3><a name="heading-1-heading-1-1" ...>heading 1.1</a><h3>In order to handle that requirement I've created an extension for custom header (
CustomHeadingBlockRenderer : HtmlObjectRenderer<HeadingBlock>), but I don't see a way to access information about preceding header at a higher level (so in this example forh3header I need to access the previoush2header).Seems that if I could access the children of the
ContainerBlockmy issue would be solved:Also, if there's a better way to handle that requirement, suggestions will be more than welcome!