API Reference

Class

MarkdownParseResult

Namespace OfficeIMO.Markdown
Assembly OfficeIMO.Markdown
Modifiers sealed

Result of parsing markdown into both the object model and a syntax tree.

Inheritance

  • Object
  • MarkdownParseResult

Usage

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters

Methods

public MarkdownSyntaxNode FindDeepestFinalNodeAtLine(Int32 lineNumber) #
Returns: MarkdownSyntaxNode

Finds the deepest syntax node in the final document tree whose source span contains the given 1-based line number.

Parameters

lineNumber System.Int32 requiredposition: 0
public MarkdownSyntaxNode FindDeepestFinalNodeAtPosition(Int32 lineNumber, Int32 columnNumber) #
Returns: MarkdownSyntaxNode

Finds the deepest syntax node in the final document tree whose source span contains the given 1-based line and column.

Parameters

lineNumber System.Int32 requiredposition: 0
columnNumber System.Int32 requiredposition: 1
public MarkdownSyntaxNode FindDeepestFinalNodeContainingSpan(MarkdownSourceSpan span) #
Returns: MarkdownSyntaxNode

Finds the deepest syntax node in the final document tree whose source span fully contains the given span.

Parameters

span OfficeIMO.Markdown.MarkdownSourceSpan requiredposition: 0
public MarkdownSyntaxNode FindDeepestFinalNodeOverlappingSpan(MarkdownSourceSpan span) #
Returns: MarkdownSyntaxNode

Finds the deepest syntax node in the final document tree whose source span overlaps the given span.

Parameters

span OfficeIMO.Markdown.MarkdownSourceSpan requiredposition: 0
public MarkdownSyntaxNode FindDeepestNodeAtLine(Int32 lineNumber) #
Returns: MarkdownSyntaxNode

Finds the deepest syntax node whose source span contains the given 1-based line number.

Parameters

lineNumber System.Int32 requiredposition: 0
public MarkdownSyntaxNode FindDeepestNodeAtPosition(Int32 lineNumber, Int32 columnNumber) #
Returns: MarkdownSyntaxNode

Finds the deepest syntax node whose source span contains the given 1-based line and column.

Parameters

lineNumber System.Int32 requiredposition: 0
columnNumber System.Int32 requiredposition: 1
public MarkdownSyntaxNode FindDeepestNodeContainingSpan(MarkdownSourceSpan span) #
Returns: MarkdownSyntaxNode

Finds the deepest syntax node whose source span fully contains the given span.

Parameters

span OfficeIMO.Markdown.MarkdownSourceSpan requiredposition: 0
public MarkdownSyntaxNode FindDeepestNodeOverlappingSpan(MarkdownSourceSpan span) #
Returns: MarkdownSyntaxNode

Finds the deepest syntax node whose source span overlaps the given span.

Parameters

span OfficeIMO.Markdown.MarkdownSourceSpan requiredposition: 0
public TAssociatedObject FindFinalAssociatedObjectAtLine<TAssociatedObject>(Int32 lineNumber) #
Returns: TAssociatedObject

Finds the nearest associated object in the final syntax tree at the given 1-based line number.

Type Parameters

TAssociatedObject

Parameters

lineNumber System.Int32 requiredposition: 0
FindFinalAssociatedObjectAtLine``1(System.Int32 lineNumber) #

Finds the nearest associated object of the requested type in the final syntax tree at the given 1-based line number.

Parameters

lineNumber System.Int32 required
public TAssociatedObject FindFinalAssociatedObjectAtPosition<TAssociatedObject>(Int32 lineNumber, Int32 columnNumber) #
Returns: TAssociatedObject

Finds the nearest associated object in the final syntax tree at the given 1-based line and column.

Type Parameters

TAssociatedObject

Parameters

lineNumber System.Int32 requiredposition: 0
columnNumber System.Int32 requiredposition: 1
FindFinalAssociatedObjectAtPosition``1(System.Int32 lineNumber, System.Int32 columnNumber) #

Finds the nearest associated object of the requested type in the final syntax tree at the given 1-based line and column.

Parameters

lineNumber System.Int32 required
columnNumber System.Int32 required
public TAssociatedObject FindFinalAssociatedObjectContainingSpan<TAssociatedObject>(MarkdownSourceSpan span) #
Returns: TAssociatedObject

Finds the nearest associated object in the final syntax tree whose source span fully contains the given span.

Type Parameters

TAssociatedObject

Parameters

span OfficeIMO.Markdown.MarkdownSourceSpan requiredposition: 0
FindFinalAssociatedObjectContainingSpan``1(OfficeIMO.Markdown.MarkdownSourceSpan span) #

Finds the nearest associated object of the requested type in the final syntax tree whose source span fully contains the given span.

Parameters

span OfficeIMO.Markdown.MarkdownSourceSpan required
public TAssociatedObject FindFinalAssociatedObjectOverlappingSpan<TAssociatedObject>(MarkdownSourceSpan span) #
Returns: TAssociatedObject

Finds the nearest associated object in the final syntax tree whose source span overlaps the given span.

Type Parameters

TAssociatedObject

Parameters

span OfficeIMO.Markdown.MarkdownSourceSpan requiredposition: 0
FindFinalAssociatedObjectOverlappingSpan``1(OfficeIMO.Markdown.MarkdownSourceSpan span) #

Finds the nearest associated object of the requested type in the final syntax tree whose source span overlaps the given span.

Parameters

span OfficeIMO.Markdown.MarkdownSourceSpan required
public MarkdownSyntaxNode FindFinalNodeForAssociatedObject(Object associatedObject) #
Returns: MarkdownSyntaxNode

Finds the first node in the final syntax tree associated with the supplied model object.

Parameters

associatedObject System.Object requiredposition: 0
public IReadOnlyList<MarkdownSyntaxNode> FindFinalNodePathAtLine(Int32 lineNumber) #
Returns: IReadOnlyList<MarkdownSyntaxNode>

Finds the syntax node path from the final document root to the deepest node containing the given 1-based line number.

Parameters

lineNumber System.Int32 requiredposition: 0
public IReadOnlyList<MarkdownSyntaxNode> FindFinalNodePathAtPosition(Int32 lineNumber, Int32 columnNumber) #
Returns: IReadOnlyList<MarkdownSyntaxNode>

Finds the syntax node path from the final document root to the deepest node containing the given 1-based line and column.

Parameters

lineNumber System.Int32 requiredposition: 0
columnNumber System.Int32 requiredposition: 1
public IReadOnlyList<MarkdownSyntaxNode> FindFinalNodePathContainingSpan(MarkdownSourceSpan span) #
Returns: IReadOnlyList<MarkdownSyntaxNode>

Finds the syntax node path from the final document root to the deepest node whose source span fully contains the given span.

Parameters

span OfficeIMO.Markdown.MarkdownSourceSpan requiredposition: 0
public IReadOnlyList<MarkdownSyntaxNode> FindFinalNodePathOverlappingSpan(MarkdownSourceSpan span) #
Returns: IReadOnlyList<MarkdownSyntaxNode>

Finds the syntax node path from the final document root to the deepest node whose source span overlaps the given span.

Parameters

span OfficeIMO.Markdown.MarkdownSourceSpan requiredposition: 0
public MarkdownSyntaxNode FindNearestBlockAtLine(Int32 lineNumber) #
Returns: MarkdownSyntaxNode

Finds the nearest block-like syntax node whose source span contains the given 1-based line number.

Parameters

lineNumber System.Int32 requiredposition: 0
public MarkdownSyntaxNode FindNearestBlockAtPosition(Int32 lineNumber, Int32 columnNumber) #
Returns: MarkdownSyntaxNode

Finds the nearest block-like syntax node whose source span contains the given 1-based line and column.

Parameters

lineNumber System.Int32 requiredposition: 0
columnNumber System.Int32 requiredposition: 1
public MarkdownSyntaxNode FindNearestBlockContainingSpan(MarkdownSourceSpan span) #
Returns: MarkdownSyntaxNode

Finds the nearest block-like syntax node whose source span fully contains the given span.

Parameters

span OfficeIMO.Markdown.MarkdownSourceSpan requiredposition: 0
public MarkdownSyntaxNode FindNearestBlockOverlappingSpan(MarkdownSourceSpan span) #
Returns: MarkdownSyntaxNode

Finds the nearest block-like syntax node whose source span overlaps the given span.

Parameters

span OfficeIMO.Markdown.MarkdownSourceSpan requiredposition: 0
public MarkdownSyntaxNode FindNearestFinalBlockAtLine(Int32 lineNumber) #
Returns: MarkdownSyntaxNode

Finds the nearest block-like syntax node in the final document tree whose source span contains the given 1-based line number.

Parameters

lineNumber System.Int32 requiredposition: 0
public MarkdownSyntaxNode FindNearestFinalBlockAtPosition(Int32 lineNumber, Int32 columnNumber) #
Returns: MarkdownSyntaxNode

Finds the nearest block-like syntax node in the final document tree whose source span contains the given 1-based line and column.

Parameters

lineNumber System.Int32 requiredposition: 0
columnNumber System.Int32 requiredposition: 1
public MarkdownSyntaxNode FindNearestFinalBlockContainingSpan(MarkdownSourceSpan span) #
Returns: MarkdownSyntaxNode

Finds the nearest block-like syntax node in the final document tree whose source span fully contains the given span.

Parameters

span OfficeIMO.Markdown.MarkdownSourceSpan requiredposition: 0
public MarkdownSyntaxNode FindNearestFinalBlockOverlappingSpan(MarkdownSourceSpan span) #
Returns: MarkdownSyntaxNode

Finds the nearest block-like syntax node in the final document tree whose source span overlaps the given span.

Parameters

span OfficeIMO.Markdown.MarkdownSourceSpan requiredposition: 0
public IReadOnlyList<MarkdownSyntaxNode> FindNodePathAtLine(Int32 lineNumber) #
Returns: IReadOnlyList<MarkdownSyntaxNode>

Finds the syntax node path from the document root to the deepest node containing the given 1-based line number.

Parameters

lineNumber System.Int32 requiredposition: 0
public IReadOnlyList<MarkdownSyntaxNode> FindNodePathAtPosition(Int32 lineNumber, Int32 columnNumber) #
Returns: IReadOnlyList<MarkdownSyntaxNode>

Finds the syntax node path from the document root to the deepest node containing the given 1-based line and column.

Parameters

lineNumber System.Int32 requiredposition: 0
columnNumber System.Int32 requiredposition: 1
public IReadOnlyList<MarkdownSyntaxNode> FindNodePathContainingSpan(MarkdownSourceSpan span) #
Returns: IReadOnlyList<MarkdownSyntaxNode>

Finds the syntax node path from the document root to the deepest node whose source span fully contains the given span.

Parameters

span OfficeIMO.Markdown.MarkdownSourceSpan requiredposition: 0
public IReadOnlyList<MarkdownSyntaxNode> FindNodePathOverlappingSpan(MarkdownSourceSpan span) #
Returns: IReadOnlyList<MarkdownSyntaxNode>

Finds the syntax node path from the document root to the deepest node whose source span overlaps the given span.

Parameters

span OfficeIMO.Markdown.MarkdownSourceSpan requiredposition: 0
TryCreateOriginalSourceSlice 6 overloads
public Boolean TryCreateOriginalSourceSlice(MarkdownSourceSpan span, out MarkdownSourceSlice slice) #
Returns: Boolean

Creates an original-input source slice for the final syntax node associated with the supplied model object.

Parameters

associatedObject System.Object requiredposition: 0
slice OfficeIMO.Markdown.MarkdownSourceSlice@ requiredposition: 1
public Boolean TryCreateOriginalSourceSlice(MarkdownSourceSpan span, out MarkdownSourceSlice slice, out MarkdownOriginalSourceSliceFailureReason failureReason) #
Returns: Boolean

Creates an original-input source slice for the final syntax node associated with the supplied model object.

Parameters

associatedObject System.Object requiredposition: 0
slice OfficeIMO.Markdown.MarkdownSourceSlice@ requiredposition: 1
failureReason OfficeIMO.Markdown.MarkdownOriginalSourceSliceFailureReason@ requiredposition: 2
TryCreateOriginalSourceSlice(OfficeIMO.Markdown.MarkdownSyntaxNode node, OfficeIMO.Markdown.MarkdownSourceSlice@ slice) #

Creates a source slice over the original reader input when it is safely equivalent to the normalized span text.

Parameters

node OfficeIMO.Markdown.MarkdownSyntaxNode required
slice OfficeIMO.Markdown.MarkdownSourceSlice@ required
TryCreateOriginalSourceSlice(OfficeIMO.Markdown.MarkdownSyntaxNode node, OfficeIMO.Markdown.MarkdownSourceSlice@ slice, OfficeIMO.Markdown.MarkdownOriginalSourceSliceFailureReason@ failureReason) #

Creates a source slice over the original reader input when it is safely equivalent to the normalized span text.

Parameters

node OfficeIMO.Markdown.MarkdownSyntaxNode required
slice OfficeIMO.Markdown.MarkdownSourceSlice@ required
failureReason OfficeIMO.Markdown.MarkdownOriginalSourceSliceFailureReason@ required
TryCreateOriginalSourceSlice(OfficeIMO.Markdown.MarkdownSourceSpan span, OfficeIMO.Markdown.MarkdownSourceSlice@ slice) #

Creates a source slice over the original reader input when it is safely equivalent to the normalized span text.

Parameters

span OfficeIMO.Markdown.MarkdownSourceSpan required
slice OfficeIMO.Markdown.MarkdownSourceSlice@ required
TryCreateOriginalSourceSlice(OfficeIMO.Markdown.MarkdownSourceSpan span, OfficeIMO.Markdown.MarkdownSourceSlice@ slice, OfficeIMO.Markdown.MarkdownOriginalSourceSliceFailureReason@ failureReason) #

Creates a source slice over the original reader input when it is safely equivalent to the normalized span text.

Parameters

span OfficeIMO.Markdown.MarkdownSourceSpan required
slice OfficeIMO.Markdown.MarkdownSourceSlice@ required
failureReason OfficeIMO.Markdown.MarkdownOriginalSourceSliceFailureReason@ required
TryCreateSourceMapping 3 overloads
public Boolean TryCreateSourceMapping(MarkdownSourceSpan span, out MarkdownSourceMapping mapping) #
Returns: Boolean

Creates a source mapping that always includes the normalized slice and includes the original-input slice when it maps safely.

Parameters

associatedObject System.Object requiredposition: 0
mapping OfficeIMO.Markdown.MarkdownSourceMapping@ requiredposition: 1
TryCreateSourceMapping(OfficeIMO.Markdown.MarkdownSyntaxNode node, OfficeIMO.Markdown.MarkdownSourceMapping@ mapping) #

Creates a source mapping that always includes the normalized slice and includes the original-input slice when it maps safely.

Parameters

node OfficeIMO.Markdown.MarkdownSyntaxNode required
mapping OfficeIMO.Markdown.MarkdownSourceMapping@ required
TryCreateSourceMapping(OfficeIMO.Markdown.MarkdownSourceSpan span, OfficeIMO.Markdown.MarkdownSourceMapping@ mapping) #

Creates a source mapping that always includes the normalized slice and includes the original-input slice when it maps safely.

Parameters

span OfficeIMO.Markdown.MarkdownSourceSpan required
mapping OfficeIMO.Markdown.MarkdownSourceMapping@ required
TryCreateSourceSlice 3 overloads
public Boolean TryCreateSourceSlice(MarkdownSourceSpan span, out MarkdownSourceSlice slice) #
Returns: Boolean

Creates a source slice for the final syntax node associated with the supplied model object.

Parameters

associatedObject System.Object requiredposition: 0
slice OfficeIMO.Markdown.MarkdownSourceSlice@ requiredposition: 1
TryCreateSourceSlice(OfficeIMO.Markdown.MarkdownSyntaxNode node, OfficeIMO.Markdown.MarkdownSourceSlice@ slice) #

Creates a source slice over the normalized markdown text that backs source spans.

Parameters

node OfficeIMO.Markdown.MarkdownSyntaxNode required
slice OfficeIMO.Markdown.MarkdownSourceSlice@ required
TryCreateSourceSlice(OfficeIMO.Markdown.MarkdownSourceSpan span, OfficeIMO.Markdown.MarkdownSourceSlice@ slice) #

Creates a source slice over the normalized markdown text that backs source spans.

Parameters

span OfficeIMO.Markdown.MarkdownSourceSpan required
slice OfficeIMO.Markdown.MarkdownSourceSlice@ required

Properties

public MarkdownDoc Document { get; } #

The parsed markdown object model.

public MarkdownSyntaxNode SyntaxTree { get; } #

The original syntax tree produced before document transforms were applied. When a transform replaces the document instance, this tree intentionally drops semantic AssociatedObject bindings to avoid stale object references. Use FinalSyntaxTree for syntax-to-model navigation against Document.

public MarkdownSyntaxNode FinalSyntaxTree { get; } #

The syntax tree corresponding to the final returned Document.

public String SourceMarkdown { get; } #

The normalized markdown source text used to compute syntax source spans.

public String OriginalMarkdown { get; } #

Raw markdown input retained when PreserveTrivia was enabled; otherwise this falls back to SourceMarkdown.

public Boolean PreservesOriginalMarkdown { get; } #

Indicates whether OriginalMarkdown contains the exact reader input captured before input normalization and line-ending normalization.

public IReadOnlyList<MarkdownDocumentTransformDiagnostic> TransformDiagnostics { get; } #

Optional document-transform diagnostics captured during parsing.

public IReadOnlyList<MarkdownGeneratedSyntaxDiagnostic> GeneratedSyntaxDiagnostics { get; } #

Diagnostics for final syntax nodes generated from semantic content rather than exact parsed source.

public IReadOnlyList<MarkdownReferenceLinkDefinition> ReferenceLinkDefinitions { get; } #

Effective reference-style link definitions collected during parsing, in source order where spans are available.

public IReadOnlyList<MarkdownAbbreviationDefinition> AbbreviationDefinitions { get; } #

Effective abbreviation definitions collected during parsing, in source order where spans are available.