CodeBlock
OfficeIMO.Markdown
Fenced code block with optional caption. Fence length adapts to backticks inside the content.
Inheritance
- MarkdownObject
- MarkdownBlock
- CodeBlock
Usage
Explore 3 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 1
- Property MarkdownNativeCodeBlock.Code
Accepted by parameters 2
Constructors
public CodeBlock(string language, string content) #Create a code block with an optional fenced-code info string.
Parameters
- language string
- content string
Inherited Methods
public void Accept(MarkdownVisitor visitor) #Parameters
- visitor MarkdownVisitor
public IEnumerable<MarkdownObject> Ancestors() #Returns
IEnumerable<MarkdownObject>public IEnumerable<MarkdownObject> AncestorsAndSelf() #Returns
IEnumerable<MarkdownObject>public IEnumerable<TObject> DescendantObjectsOfType<TObject>() #Type Parameters
- TObject
Returns
IEnumerable<TObject>public IEnumerable<MarkdownObject> Descendants() #Returns
IEnumerable<MarkdownObject>Properties
public string Language { get; } #Parsed primary fence language token (for example csharp or bash).
public string InfoString { get; } #Full fenced-code info string as it appeared after the opening fence marker.
public MarkdownCodeFenceInfo FenceInfo { get; } #Structured fenced-code info metadata.
public string Content { get; } #Code contents, excluding one terminating newline when parsed from a code block.
public MarkdownSourceSpan? OpeningFenceSourceSpan { get; internal set; } #Source span for the opening fence token when parsed from a fenced source block.
public MarkdownSourceSpan? InfoStringSourceSpan { get; internal set; } #Source span for the fenced-code info string when parsed from a fenced source block.
public MarkdownSourceSpan? ContentSourceSpan { get; internal set; } #Source span for the code payload when source-backed.
public MarkdownSourceSpan? ClosingFenceSourceSpan { get; internal set; } #Source span for the closing fence token when parsed from a closed fenced source block.
Inherited Properties
public MarkdownSourceSpan? SourceSpan { get; internal set; } #public IReadOnlyList<MarkdownObject> ChildObjects { get; } #