IBlockParser<TProcessor> Interface

Base interface for a BlockParser.

public interface IBlockParser<in TProcessor> : IMarkdownParser<TProcessor>

Type parameters

TProcessor

See also

Implements

Methods

NameDescription
CanInterrupt(TProcessor, Block)Determines whether this instance can interrupt the specified block being processed.
Close(TProcessor, Block)Called when a block matched by this parser is being closed (to allow final computation on the block).
TryContinue(TProcessor, Block)Tries to continue matching a block already opened.
TryOpen(TProcessor)Tries to match a block opening.

CanInterrupt(TProcessor, Block)

Determines whether this instance can interrupt the specified block being processed.

bool CanInterrupt(TProcessor processor, Block block)

Parameters

processor TProcessor
The parser processor.
block Block
The block being processed.

Returns

bool true if this parser can interrupt the specified block being processed.

Close(TProcessor, Block)

Called when a block matched by this parser is being closed (to allow final computation on the block).

bool Close(TProcessor processor, Block block)

Parameters

processor TProcessor
The parser processor.
block Block
The block being closed.

Returns

bool true to keep the block; false to remove it. True by default.

TryContinue(TProcessor, Block)

Tries to continue matching a block already opened.

BlockState TryContinue(TProcessor processor, Block block)

Parameters

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

Returns

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

TryOpen(TProcessor)

Tries to match a block opening.

BlockState TryOpen(TProcessor processor)

Parameters

processor TProcessor
The parser processor.

Returns

BlockState The result of the match