Rules are tried top-to-bottom against the current token. The first
rule whose startTokens match the token type and whose parse()
returns { success: true } wins.
Ordering rationale:
Paired formatting markers (bold, italic, underline, strikethrough,
superscript, subscript, monospace) -- most common inline syntax
Link rules (triple, single, anchor, star) -- order matters because
[[[ must be tried before [
All inline rules in priority order.
Rules are tried top-to-bottom against the current token. The first rule whose
startTokensmatch the token type and whoseparse()returns{ success: true }wins.Ordering rationale:
[[[must be tried before[The
fallbackRuleis intentionally excluded; it is used as a separate last-resort handler.