Table of Contents

Class Element

Namespace
Loehnert.Asciidoc
Assembly
Loehnert.Asciidoc.dll

Represents a AsciiDoc element.

public abstract class Element
Inheritance
Element
Derived
Inherited Members
Extension Methods

Properties

Empty

Gets an empty element.

public static FormattableElement Empty { get; }

Property Value

FormattableElement

Parent

Gets the parent element.

public virtual Element Parent { get; }

Property Value

Element

Methods

AddAsciidocTo(StringBuilder)

Converts the element to AsciiDoc.

public abstract void AddAsciidocTo(StringBuilder builder)

Parameters

builder StringBuilder

The AsciiDoc content is added to this.

GetDepth<TElement>()

Gets the recursive depth of elements of type TElement.

protected int GetDepth<TElement>() where TElement : Element

Returns

int

Depth.

Type Parameters

TElement

Type of the relevant elements.

Remarks

Use this function to detect the heading level of a Section.

Operators

implicit operator Element(string)

Creates a Run from text.

public static implicit operator Element(string text)

Parameters

text string

Text of the run.

Returns

Element