Back to API Reference
Struct

ParsedRange

sealed

Represents a parsed text range with associated tag information.

Remarks

Used by ParseRule implementations to communicate which text regions should be affected by modifiers and where tags should be stripped.
public bool HasMarkup{ get }

Returns true if this range has associated tags.

public bool IsSelfClosing{ get }

Returns true if this is a self-closing tag with inserted content.

public bool IsRemovableMarkup{ get }

A removable content pair — tagged and not self-closing (what gets stripped, matched, and chromed).

[ctor]public ParsedRange()

Creates a simple range without tag information.

[ctor]public ParsedRange()

Creates a range with opening and closing tag positions.

public static ParsedRange SelfClosing()

Creates a self-closing tag range that inserts content.

public int start

Start index of the content (after opening tag).

public int end

End index of the content (before closing tag).

public int openStart

Start index of the opening tag, or -1 if no tag.

public int openEnd

End index of the opening tag.

public int closeStart

Start index of the closing tag. -1 when the syntax has no close marker by design (list items) — distinct from an unclosed pair.

public int closeEnd

End index of the closing tag, or -1 with closeStart.

public string parameter

Parameter extracted from the tag (e.g., color value).

public string label

Optional #label anchor authored on the opening tag, or null.

public string insertString

String to insert for self-closing tags.

public ParseRule sourceRule

The leaf rule that produced this range — stamped by aggregating rules (CompositeParseRule) so per-syntax consumers (markup chrome) resolve against the actual syntax, not the aggregate. Null = the matching rule itself.

public string matchKey

Optional stable key used to reconcile this logical match across revisions.

public RangeChannel channel

Optional semantic routing channel for the produced range entity.

public object payload

Optional semantic payload validated against channel.