FencedCodeBlock Class
Represents a fenced code block.
public class FencedCodeBlock : CodeBlock, IBlock, IFencedBlock, IMarkdownObjectRemarks
Related to CommonMark spec: 4.5 Fenced code blocks
- Inheritance
CodeBlockFencedCodeBlock- Implements
Constructors
| Name | Description |
|---|---|
| FencedCodeBlock(BlockParser) | Initializes a new instance of the FencedCodeBlock class. |
FencedCodeBlock(BlockParser)
FencedCodeBlock.csInitializes a new instance of the FencedCodeBlock class.
public FencedCodeBlock(BlockParser parser)Parameters
parserBlockParser- The parser.
Properties
| Name | Description |
|---|---|
| Arguments | Gets or sets the arguments after the IFencedBlock.Info. May be null. |
| ClosingFencedCharCount | Gets or sets the fenced character count used to close this fenced code block. |
| FencedChar | Gets or sets the fenced character used to open and close this fenced code block. |
| IndentCount | Gets or sets the indent count when the fenced code block was indented and we need to remove up to indent count chars spaces from the beginning of a line. |
| Info | Gets or sets the language parsed after the first line of the fenced code block. May be null. |
| InfoNewLine | Newline of the line with the opening fenced chars. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise NewLine.None. |
| OpeningFencedCharCount | Gets or sets the fenced character count used to open this fenced code block. |
| TriviaAfterArguments | Gets or sets the trivia after the IFencedBlock.Arguments. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise StringSlice.Empty. |
| TriviaAfterFencedChar | Gets or sets the trivia after the IFencedBlock.FencedChar. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise StringSlice.Empty. |
| TriviaAfterInfo | Gets or sets the trivia after the IFencedBlock.Info. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise StringSlice.Empty. |
| TriviaBeforeClosingFence | Trivia before the closing fenced chars Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise StringSlice.Empty. |
| UnescapedArguments | Non-escaped IFencedBlock.Arguments exactly as in source markdown. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise StringSlice.Empty. |
| UnescapedInfo | Non-escaped IFencedBlock.Info exactly as in source markdown. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise StringSlice.Empty. |
Arguments
FencedCodeBlock.csGets or sets the arguments after the IFencedBlock.Info. May be null.
public string? Arguments { get; set; }Property value
ClosingFencedCharCount
FencedCodeBlock.csFencedChar
FencedCodeBlock.csIndentCount
FencedCodeBlock.csInfoNewLine
FencedCodeBlock.csNewline of the line with the opening fenced chars. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise NewLine.None.
public NewLine InfoNewLine { get; set; }Property value
OpeningFencedCharCount
FencedCodeBlock.csTriviaAfterArguments
FencedCodeBlock.csGets or sets the trivia after the IFencedBlock.Arguments. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise StringSlice.Empty.
public StringSlice TriviaAfterArguments { get; set; }Property value
TriviaAfterFencedChar
FencedCodeBlock.csGets or sets the trivia after the IFencedBlock.FencedChar. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise StringSlice.Empty.
public StringSlice TriviaAfterFencedChar { get; set; }Property value
TriviaAfterInfo
FencedCodeBlock.csGets or sets the trivia after the IFencedBlock.Info. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise StringSlice.Empty.
public StringSlice TriviaAfterInfo { get; set; }Property value
TriviaBeforeClosingFence
FencedCodeBlock.csTrivia before the closing fenced chars Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise StringSlice.Empty.
public StringSlice TriviaBeforeClosingFence { get; set; }Property value
UnescapedArguments
FencedCodeBlock.csNon-escaped IFencedBlock.Arguments exactly as in source markdown. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise StringSlice.Empty.
public StringSlice UnescapedArguments { get; set; }Property value
UnescapedInfo
FencedCodeBlock.csNon-escaped IFencedBlock.Info exactly as in source markdown. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise StringSlice.Empty.
public StringSlice UnescapedInfo { get; set; }