TriggerWordParseRule
Auto-detects <trigger>word tokens in plain text (mentions, hashtags) and produces a style-only range per token whose parameter is the word without the trigger.
Remarks
Characters of which at least one must be at the match position for TryMatch to succeed at all (consuming or style-only). Defaults to MarkupTriggers — override when the rule matches at characters beyond its consuming set (raw-URL scheme letters). The parser bakes the union into a jump table and skips runs of non-trigger text, so an accurate set here is a large parse speedup; null disables the fast scan for the whole component.
Stable identity shared by rule instances that match the same syntax, compared case-insensitively — pairs separately configured instances (style merging, ByRule chrome selectors). The default (full type name) is correct for configuration-free rules. A rule whose instances can be configured to match different syntaxes MUST qualify it (TagRule → "tag:" + name, marker rule → "marker:" + marker) or return null (identity by reference only) — otherwise differently configured instances are falsely treated as the same rule. Called on hot paths — cache the string, don't rebuild it per access.
public override int TryMatch(ReadOnlySpan<char> text, int index, PooledList<ParsedRange> results)Attempts to match a pattern starting at the specified index.
