Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

MarkdownInlineParserContext

OfficeIMO.Markdown

Namespace
OfficeIMO.Markdown
Assembly
OfficeIMO.Markdown
Source revision
0eef6a5756b9 with working tree changes
Modifiers
sealed

Context passed to custom inline parser extensions.

Inheritance

  • object
  • MarkdownInlineParserContext

Usage

Explore 2 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 2

Methods

public MarkdownSourceSpan? GetSourceSpan(int relativeStart, int length) #

Returns the source span for a slice relative to the current parser position, when source mapping is available.

Parameters

relativeStart int required
length int required
public InlineSequence ParseNestedInlines(int relativeStart, int length, bool allowLinks = true, bool allowImages = true) #

Parses a nested inline segment relative to the current parser position while preserving source-map offsets.

Parameters

relativeStart int required
length int required
allowLinks bool = true optional
allowImages bool = true optional
public bool TryCreateSourceSlice(int relativeStart, int length, out MarkdownSourceSlice slice) #

Creates a normalized source slice for a range relative to the current parser position.

Parameters

relativeStart int required
Zero-based character offset from the current parser position.
length int required
Number of inline-source characters covered by the slice.
slice OfficeIMO.Markdown.MarkdownSourceSlice required
Materialized normalized source slice when the method returns true.

Returns

bool true when source mapping and normalized reader input are available for the requested range.

Properties

public string Text { get; } #

Full inline source text being parsed.

public int Position { get; } #

Current parser position within MarkdownInlineParserContext.Text.

public MarkdownLoadOptions Options { get; } #

Reader options active for the current parse.

public MarkdownReaderState? State { get; } #

Reader state shared with the current parse, including reference definitions when available.

public bool AllowImages { get; } #

Whether nested parsing at this point is allowed to produce images.

public char CurrentChar { get; } #

Character at the current parser position, or '\0' when positioned at the end of the input.

public string RemainingText { get; } #

Returns the remaining unparsed text starting at MarkdownInlineParserContext.Position.