Back to API Reference
Class

TriggerWordParseRule

sealed
Inherits:ParseRule

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

The trigger character is serialized — nothing is hardcoded. The word charset is Unicode letters, digits and underscore, extendable through ExtraWordChars (e.g. "-." for handles that allow them). A match requires the trigger at a word start: the preceding character must not be a word character or another trigger, and at least one word character must follow — so e-mail addresses (user@host) and doubled triggers stay plain text. Style-only: the trigger and word remain visible, nothing is consumed. Runs at negative priority so explicit markup (tags, Markdown) wins where they overlap.
public int Priority{ get }

Low priority ensures this runs after explicit markup rules.

public string MarkupTriggers{ get }

Style-only matches — the trigger and word stay on screen, nothing is consumed.

public string TypingTriggers{ get }
public string ScanTriggers{ get }
public string Identity{ get }
[ctor]public TriggerWordParseRule()
[ctor]public TriggerWordParseRule()
public override int TryMatch()

See Also