FencedBlockParserBase<T> Class
Base parser for fenced blocks (opened by 3 or more character delimiters on a first line, and closed by at least the same number of delimiters)
public abstract class FencedBlockParserBase<T> : FencedBlockParserBase where T : Block, IFencedBlock- Inheritance
FencedBlockParserBaseFencedBlockParserBase<T>
Constructors
| Name | Description |
|---|---|
| FencedBlockParserBase() | Initializes a new instance of the FencedBlockParserBase<T> class. |
FencedBlockParserBase()
FencedBlockParserBase.csInitializes a new instance of the FencedBlockParserBase<T> class.
protected FencedBlockParserBase()Properties
| Name | Description |
|---|---|
| InfoPrefix | Gets or sets the language prefix (default is "language-") |
| MaximumMatchCount | Gets or sets the maximum match count. |
| MinimumMatchCount | Gets or sets the minimum match count. |
InfoPrefix
FencedBlockParserBase.csMaximumMatchCount
FencedBlockParserBase.csMinimumMatchCount
FencedBlockParserBase.csMethods
| Name | Description |
|---|---|
| CreateFencedBlock(BlockProcessor) | Performs the create fenced block operation. |
| DefaultInfoParser(BlockProcessor, StringSlice, IFencedBlock, char) | The default parser for the information after the fenced code block special characters (usually ` or ~) |
| RoundtripInfoParser(BlockProcessor, StringSlice, IFencedBlock, char) | The roundtrip parser for the information after the fenced code block special characters (usually ` or ~) |
| TryContinue(BlockProcessor, Block) | Attempts to continue parsing the specified block. |
| TryOpen(BlockProcessor) | Attempts to open a block at the current parser position. |
CreateFencedBlock(BlockProcessor)
Performs the create fenced block operation.
protected abstract T CreateFencedBlock(BlockProcessor processor)DefaultInfoParser(BlockProcessor, StringSlice, IFencedBlock, char)
FencedBlockParserBase.csThe default parser for the information after the fenced code block special characters (usually ` or ~)
public static bool DefaultInfoParser(BlockProcessor state, ref StringSlice line, IFencedBlock fenced, char openingCharacter)Parameters
stateBlockProcessor- The parser processor.
lineStringSlice- The line.
fencedIFencedBlock- The fenced code block.
openingCharacterchar- The opening character for this fenced code block.
Returns
bool true if parsing of the line is successfull; false otherwise
RoundtripInfoParser(BlockProcessor, StringSlice, IFencedBlock, char)
FencedBlockParserBase.csThe roundtrip parser for the information after the fenced code block special characters (usually ` or ~)
public static bool RoundtripInfoParser(BlockProcessor blockProcessor, ref StringSlice line, IFencedBlock fenced, char openingCharacter)Parameters
blockProcessorBlockProcessor- The parser processor.
lineStringSlice- The line.
fencedIFencedBlock- The fenced code block.
openingCharacterchar- The opening character for this fenced code block.
Returns
bool true if parsing of the line is successfull; false otherwise
TryContinue(BlockProcessor, Block)
FencedBlockParserBase.csAttempts to continue parsing the specified block.
public override BlockState TryContinue(BlockProcessor processor, Block block)TryOpen(BlockProcessor)
FencedBlockParserBase.csAttempts to open a block at the current parser position.
public override BlockState TryOpen(BlockProcessor processor)