YamlFrontMatterParser Class

Block parser for a YAML frontmatter.

public class YamlFrontMatterParser : BlockParser
Inheritance
BlockParser YamlFrontMatterParser

Constructors

NameDescription
YamlFrontMatterParser()Initializes a new instance of the YamlFrontMatterParser class.

YamlFrontMatterParser()

YamlFrontMatterParser.cs

Initializes a new instance of the YamlFrontMatterParser class.

public YamlFrontMatterParser()

Properties

NameDescription
AllowInMiddleOfDocumentAllows the YamlFrontMatterBlock to appear in the middle of the markdown file.

AllowInMiddleOfDocument

YamlFrontMatterParser.cs

Allows the YamlFrontMatterBlock to appear in the middle of the markdown file.

public bool AllowInMiddleOfDocument { get; set; }

Property value

bool

Methods

NameDescription
CreateFrontMatterBlock(BlockProcessor)Creates the front matter block.
TryContinue(BlockProcessor, Block)Tries to continue matching a block already opened.
TryOpen(BlockProcessor)Tries to match a block opening.

CreateFrontMatterBlock(BlockProcessor)

YamlFrontMatterParser.cs

Creates the front matter block.

protected virtual YamlFrontMatterBlock CreateFrontMatterBlock(BlockProcessor processor)

Parameters

processor BlockProcessor
The block processor

Returns

YamlFrontMatterBlock The front matter block

TryContinue(BlockProcessor, Block)

YamlFrontMatterParser.cs

Tries to continue matching a block already opened.

public override BlockState TryContinue(BlockProcessor processor, Block block)

Parameters

processor BlockProcessor
The parser processor.
block Block
The block already opened.

Returns

BlockState The result of the match. By default, don't expect any newline

TryOpen(BlockProcessor)

YamlFrontMatterParser.cs

Tries to match a block opening.

public override BlockState TryOpen(BlockProcessor processor)

Parameters

processor BlockProcessor
The parser processor.

Returns

BlockState The result of the match