MarkdownInlineParserContext
OfficeIMO.Markdown
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
- Method MarkdownInlineParser.BeginInvoke
- Method MarkdownInlineParser.Invoke
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
- length int
Returns
MarkdownSourceSpan?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
- length int
- allowLinks bool = true
- allowImages bool = true
Returns
InlineSequencepublic 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
- Zero-based character offset from the current parser position.
- length int
- Number of inline-source characters covered by the slice.
- slice OfficeIMO.Markdown.MarkdownSourceSlice
- 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.Inherited Methods
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 AllowLinks { get; } #Whether nested parsing at this point is allowed to produce links.
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.