Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

MarkdownParseResult

Namespace OfficeIMO.Markdown
Assembly OfficeIMO.Markdown
Source revision 02c4d39034ec with working tree changes
Implements
IOfficeResult<MarkdownDoc> IOfficeResult
Modifiers sealed

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

Inheritance

  • Object
  • MarkdownParseResult

Usage

Explore 10 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 4

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 Object? FindFinalAssociatedObjectAtLine(Int32 lineNumber) #
Returns: Object?

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

Parameters

lineNumber System.Int32 requiredposition: 0
public TAssociatedObject? FindFinalAssociatedObjectAtLine<TAssociatedObject>(Int32 lineNumber) #
Returns: TAssociatedObject?

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

Type Parameters

TAssociatedObject

Parameters

lineNumber System.Int32 requiredposition: 0
public Object? FindFinalAssociatedObjectAtPosition(Int32 lineNumber, Int32 columnNumber) #
Returns: Object?

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

Parameters

lineNumber System.Int32 requiredposition: 0
columnNumber System.Int32 requiredposition: 1
public TAssociatedObject? FindFinalAssociatedObjectAtPosition<TAssociatedObject>(Int32 lineNumber, Int32 columnNumber) #
Returns: TAssociatedObject?

Finds the nearest associated object of the requested type 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
public Object? FindFinalAssociatedObjectContainingSpan(MarkdownSourceSpan span) #
Returns: Object?

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

Parameters

span OfficeIMO.Markdown.MarkdownSourceSpan requiredposition: 0
public TAssociatedObject? FindFinalAssociatedObjectContainingSpan<TAssociatedObject>(MarkdownSourceSpan span) #
Returns: TAssociatedObject?

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

Type Parameters

TAssociatedObject

Parameters

span OfficeIMO.Markdown.MarkdownSourceSpan requiredposition: 0
public Object? FindFinalAssociatedObjectOverlappingSpan(MarkdownSourceSpan span) #
Returns: Object?

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

Parameters

span OfficeIMO.Markdown.MarkdownSourceSpan requiredposition: 0
public TAssociatedObject? FindFinalAssociatedObjectOverlappingSpan<TAssociatedObject>(MarkdownSourceSpan span) #
Returns: TAssociatedObject?

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

Type Parameters

TAssociatedObject

Parameters

span OfficeIMO.Markdown.MarkdownSourceSpan requiredposition: 0
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
public MarkdownDoc RequireValue() #
Returns: MarkdownDoc

Returns the produced value or throws when the operation did not complete.

TryCreateOriginalSourceSlice 6 overloads
public Boolean TryCreateOriginalSourceSlice(Object associatedObject, 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(Object associatedObject, 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
public Boolean TryCreateOriginalSourceSlice(MarkdownSyntaxNode node, out MarkdownSourceSlice slice) #
Returns: Boolean

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

Parameters

node OfficeIMO.Markdown.MarkdownSyntaxNode requiredposition: 0
slice OfficeIMO.Markdown.MarkdownSourceSlice requiredposition: 1
public Boolean TryCreateOriginalSourceSlice(MarkdownSyntaxNode node, out MarkdownSourceSlice slice, out MarkdownOriginalSourceSliceFailureReason failureReason) #
Returns: Boolean

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

Parameters

node OfficeIMO.Markdown.MarkdownSyntaxNode requiredposition: 0
slice OfficeIMO.Markdown.MarkdownSourceSlice requiredposition: 1
failureReason OfficeIMO.Markdown.MarkdownOriginalSourceSliceFailureReason requiredposition: 2
public Boolean TryCreateOriginalSourceSlice(MarkdownSourceSpan span, out MarkdownSourceSlice slice) #
Returns: Boolean

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

Parameters

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

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

Parameters

span OfficeIMO.Markdown.MarkdownSourceSpan requiredposition: 0
slice OfficeIMO.Markdown.MarkdownSourceSlice requiredposition: 1
failureReason OfficeIMO.Markdown.MarkdownOriginalSourceSliceFailureReason requiredposition: 2
TryCreateSourceMapping 3 overloads
public Boolean TryCreateSourceMapping(Object associatedObject, 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
public Boolean TryCreateSourceMapping(MarkdownSyntaxNode node, 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

node OfficeIMO.Markdown.MarkdownSyntaxNode requiredposition: 0
mapping OfficeIMO.Markdown.MarkdownSourceMapping requiredposition: 1
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

span OfficeIMO.Markdown.MarkdownSourceSpan requiredposition: 0
mapping OfficeIMO.Markdown.MarkdownSourceMapping requiredposition: 1
TryCreateSourceSlice 3 overloads
public Boolean TryCreateSourceSlice(Object associatedObject, 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
public Boolean TryCreateSourceSlice(MarkdownSyntaxNode node, out MarkdownSourceSlice slice) #
Returns: Boolean

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

Parameters

node OfficeIMO.Markdown.MarkdownSyntaxNode requiredposition: 0
slice OfficeIMO.Markdown.MarkdownSourceSlice requiredposition: 1
public Boolean TryCreateSourceSlice(MarkdownSourceSpan span, out MarkdownSourceSlice slice) #
Returns: Boolean

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

Parameters

span OfficeIMO.Markdown.MarkdownSourceSpan requiredposition: 0
slice OfficeIMO.Markdown.MarkdownSourceSlice requiredposition: 1

Properties

public MarkdownDoc Document { get; } #

The parsed markdown object model.

public MarkdownDoc Value { get; } #

Gets the produced value, or null when the operation did not complete.

public Boolean Succeeded { get; } #

Gets whether the operation completed successfully.

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 MarkdownSyntaxNode.AssociatedObject bindings to avoid stale object references. Use MarkdownParseResult.FinalSyntaxTree for syntax-to-model navigation against MarkdownParseResult.Document.

public MarkdownSyntaxNode FinalSyntaxTree { get; } #

The syntax tree corresponding to the final returned MarkdownParseResult.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 MarkdownReaderOptions.PreserveTrivia was enabled; otherwise this falls back to MarkdownParseResult.SourceMarkdown.

public Boolean PreservesOriginalMarkdown { get; } #

Indicates whether MarkdownParseResult.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.