API Reference
CodeBlock
Fenced code block with optional caption. Fence length adapts to backticks inside the content.
Inheritance
- MarkdownBlock
- CodeBlock
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Property MarkdownNativeCodeBlock.Code
Accepted by parameters
Constructors
public CodeBlock(String language, String content) #Create a code block with an optional fenced-code info string.
Parameters
- language System.String
- content System.String
Methods
Inherited Methods
public Void Accept(MarkdownVisitor visitor) #VoidParameters
- visitor MarkdownVisitor
public IEnumerable<MarkdownObject> Ancestors() #IEnumerable<MarkdownObject>public IEnumerable<MarkdownObject> AncestorsAndSelf() #IEnumerable<MarkdownObject>public IEnumerable<TObject> DescendantObjectsOfType<TObject>() #IEnumerable<TObject>Type Parameters
- TObject
public IEnumerable<MarkdownObject> Descendants() #IEnumerable<MarkdownObject>public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
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 virtual String Caption { get; set; } #Optional caption shown under the block.
public Nullable<MarkdownSourceSpan> OpeningFenceSourceSpan { get; set; } #Source span for the opening fence token when parsed from a fenced source block.
public Nullable<MarkdownSourceSpan> InfoStringSourceSpan { get; set; } #Source span for the fenced-code info string when parsed from a fenced source block.
public Nullable<MarkdownSourceSpan> ContentSourceSpan { get; set; } #Source span for the code payload when source-backed.
public Nullable<MarkdownSourceSpan> ClosingFenceSourceSpan { get; set; } #Source span for the closing fence token when parsed from a closed fenced source block.
Inherited Properties
public MarkdownObject Parent { get; } #public MarkdownDoc Document { get; } #public MarkdownObject Root { get; } #public Nullable<Int32> IndexInParent { get; } #public MarkdownObject PreviousSibling { get; } #public MarkdownObject NextSibling { get; } #public Nullable<MarkdownSourceSpan> SourceSpan { get; set; } #public MarkdownAttributeSet Attributes { get; } #public IReadOnlyList<MarkdownObject> ChildObjects { get; } #