Descendants(MarkdownObject) Method

Definition

Namespace Markdig.Syntax
Assembly Markdig.dll

Iterates over the descendant elements for the specified markdown element, including Block and Inline and filters by the type T.

The descendant elements are returned in DFS-like order.

public static IEnumerable<T> Descendants<T>(this MarkdownObject markdownObject)
    where T : MarkdownObject

Type parameters

T
Type to use for filtering the descendants

Parameters

markdownObject
MarkdownObject

The markdown object.

Returns

IEnumerable<T>
An iteration over the descendant elements