Back to API Reference
Interface
IParseRule
abstract
Interface for custom text parsing rules that identify modifier application ranges.
Remarks
Parse rules scan text for markup (XML tags, Markdown, custom markers) and produce ParsedRange entries that specify where modifiers should be applied. Rules are matched in priority order (highest first). Use higher priority for explicit markup rules (tags, Markdown) and lower priority for auto-detection rules (raw URLs).
Implementations(14)
Types that implement IParseRule.
CCCCCCCCCCCCCC
BackslashEscapeRule
Escapes a single ASCII punctuation character preceded by \. Example: \* becomes a literal * and is protected from any other parse rule.
CodeSpanRule
Protects content inside backtick-delimited code spans (e.g. `x`, ``x``, ```x```) from being processed by other parse rules. Follows CommonMark §6.1 balanced-run semantics: an N-backtick run is closed by the next N-backtick run of the same length.
CompositeParseRule
Combines multiple parse rules into a single rule.
LineBreakParseRule
Replaces the void <br> tag with a soft line break (U+2028 LINE SEPARATOR): the line wraps but stays in the same paragraph, keeping the surrounding direction and taking no inter-paragraph spacing — like HTML <br> or a word-processor Shift+Enter. A paragraph break is a literal newline (Enter) instead. Matches <br>, <br/> and <br /> case-insensitively with HTML void-element semantics: no closing tag, no nested content.
MarkdownLinkParseRule
Parses Markdown-style links: [link text](https://example.com).
MarkdownListParseRule
Parses Markdown-style lists (bulleted and numbered).
MarkdownWrapRule
Parses symmetric open/close markers in text (e.g., **text**, ~~text~~).
NoparseTagRule
Protects content inside <noparse>...</noparse> from being processed by any other parse rule. The markers themselves are stripped; the content between them appears verbatim in the output.
RangeRule
RawUrlParseRule
Auto-detects URLs in plain text and converts them to clickable links.
RubyParseRule
Parses ruby (furigana) markup into base + reading ranges for [[RubyModifier]].
SeparatorParseRule
Replaces the void separator tag (default <sep>) with the configured separator string and marks the inserted range for a paired [[SeparatorModifier]].
StringParseRule
Matches literal string patterns and optionally replaces them.
TagParseRule
Base class for parsing XML-style markup tags (e.g., <b>, <color=#FF0000>).
public abstract int TryMatch(ReadOnlySpan<char> text, int index, PooledList<ParsedRange> results)Attempts to match a pattern starting at the specified index.
See Also
TagParseRuleAttributeParser
