HeadingBlock Class

Represents a heading.

public class HeadingBlock : LeafBlock
Inheritance
LeafBlock HeadingBlock

Constructors

NameDescription
HeadingBlock(BlockParser)Initializes a new instance of the HeadingBlock class.

HeadingBlock(BlockParser)

HeadingBlock.cs

Initializes a new instance of the HeadingBlock class.

public HeadingBlock(BlockParser parser)

Parameters

parser BlockParser
The parser.

Properties

NameDescription
HeaderCharGets or sets the header character used to defines this heading (usually #)
HeaderCharCountGets or sets the amount of - or = characters when HeadingBlock.IsSetext is true.
IsSetextTrue if this heading is a Setext heading.
LevelGets or sets the level of heading (starting at 1 for the lowest level).
SetextNewlineGets or sets the newline of the first line when HeadingBlock.IsSetext is true. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled.
TriviaAfterAtxHeaderCharGets or sets the whitespace after the # character when HeadingBlock.IsSetext is false. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise StringSlice.Empty.

HeaderChar

HeadingBlock.cs

Gets or sets the header character used to defines this heading (usually #)

public char HeaderChar { get; set; }

Property value

char

HeaderCharCount

HeadingBlock.cs

Gets or sets the amount of - or = characters when HeadingBlock.IsSetext is true.

public int HeaderCharCount { get; set; }

Property value

int

True if this heading is a Setext heading.

public bool IsSetext { get; set; }

Property value

bool

Gets or sets the level of heading (starting at 1 for the lowest level).

public int Level { get; set; }

Property value

int

SetextNewline

HeadingBlock.cs

Gets or sets the newline of the first line when HeadingBlock.IsSetext is true. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled.

public NewLine SetextNewline { get; set; }

Property value

NewLine

TriviaAfterAtxHeaderChar

HeadingBlock.cs

Gets or sets the whitespace after the # character when HeadingBlock.IsSetext is false. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise StringSlice.Empty.

public StringSlice TriviaAfterAtxHeaderChar { get; set; }

Property value

StringSlice