mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-03 21:36:36 +00:00
Abstract Syntax Tree - Nested objects #511
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 @aviveldan on GitHub (Mar 17, 2022).
Hi,
Would be glad for your help. Not sure if it is a feature request or silly question.
I am trying to work with the AST.
Now I want to check if there are nodes within the group of types: bold, italic, header
I tried using the Enumerator:
var i = result.GetEnumerator();But the MoveNext method doesn't go through nested nodes, and therefore I need to check the type of the current object:
i.Current.GetType()and then use dynamic variable and casting if it is in the list of the objects that can have children objects...
I am pretty sure this isn't how I should traverse the tree.
Any ideas how to do that efficiently?
Thanks in advance :)