mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-04 05:44:50 +00:00
Get items from parsed MarkdownDocument #289
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 @asbjornu on GitHub (Apr 24, 2019).
After parsing some Markdown to a
MarkdownDocument, I'm wondering how I can iterate through the document to find allLeafInlineobjects that is of a certain extension class I've implemented. I'm dumbfounded by how to get further down into the document than at theBlocklevel. Are leaf nodes not available in theMarkdownDocument?This is my code:
@asbjornu commented on GitHub (Apr 24, 2019):
I think I figured it out:
@MihaZupan commented on GitHub (Apr 24, 2019):
@asbjornu You might find these ways of traversing the AST useful
I suppose a
Descendants<Inline>could be added@asbjornu commented on GitHub (Apr 25, 2019):
Thanks for the tip, @MihaZupan!