MarkdownBlockSyntaxBuilderContext
OfficeIMO.Markdown
Helper context passed to ISyntaxMarkdownBlockWithContext implementations when they build custom syntax-tree nodes.
Inheritance
- object
- MarkdownBlockSyntaxBuilderContext
Usage
Explore 1 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.
Accepted by parameters 1
Methods
public MarkdownSyntaxNode BuildBlock(IMarkdownBlock block, MarkdownSourceSpan? span = null) #Builds a syntax node for a child block using the core reader's standard mapping rules.
Parameters
- block OfficeIMO.Markdown.IMarkdownBlock
- span OfficeIMO.Markdown.MarkdownSourceSpan? = null
Returns
MarkdownSyntaxNodepublic IReadOnlyList<MarkdownSyntaxNode> BuildChildSyntaxNodes(IEnumerable<IMarkdownBlock> children) #Builds child syntax nodes for a sequence of child blocks.
Parameters
- children System.Collections.Generic.IEnumerable<OfficeIMO.Markdown.IMarkdownBlock>
Returns
IReadOnlyList<MarkdownSyntaxNode>public MarkdownSyntaxNode BuildInlineContainerNode(MarkdownSyntaxKind kind, InlineSequence inlines, MarkdownSourceSpan? span = null, string? literal = null) #Builds a syntax node for inline content wrapped in a specific syntax kind.
Parameters
- kind OfficeIMO.Markdown.MarkdownSyntaxKind
- inlines OfficeIMO.Markdown.InlineSequence
- span OfficeIMO.Markdown.MarkdownSourceSpan? = null
- literal string? = null
Returns
MarkdownSyntaxNodepublic MarkdownSyntaxNode BuildInlineContainerNode(MarkdownSyntaxKind kind, InlineSequence inlines, MarkdownSourceSpan? span, string? literal, object? associatedObject) #Builds a syntax node for inline content with an explicit associated object. Use this when a wrapper syntax node represents a semantic owner other than the inline sequence itself.
Parameters
- kind OfficeIMO.Markdown.MarkdownSyntaxKind
- inlines OfficeIMO.Markdown.InlineSequence
- span OfficeIMO.Markdown.MarkdownSourceSpan?
- literal string?
- associatedObject object?
Returns
MarkdownSyntaxNodepublic IReadOnlyList<MarkdownSyntaxNode> BuildOwnedChildSyntaxNodes(IChildMarkdownBlockContainer container) #Builds child syntax nodes for a child-block container using the same owned-syntax projection rules as the core reader, falling back to the container's public child blocks when no parsed syntax is available.
Parameters
- container OfficeIMO.Markdown.IChildMarkdownBlockContainer
Returns
IReadOnlyList<MarkdownSyntaxNode>public MarkdownSourceSpan? GetAggregateSpan(IReadOnlyList<MarkdownSyntaxNode>? nodes) #Computes an aggregate source span covering the supplied child nodes when possible.
Parameters
- nodes System.Collections.Generic.IReadOnlyList<OfficeIMO.Markdown.MarkdownSyntaxNode>?
Returns
MarkdownSourceSpan?public string NormalizeLiteralLineEndings(string? value) #Normalizes line endings for syntax-node literals to the reader's canonical newline form.
Parameters
- value string?
Returns
string