Back to API Reference
Class

MarkdownWrapRule

sealed
Inherits:ParseRule

Parses symmetric open/close markers in text (e.g., **text**, ~~text~~).

Remarks

The marker string is configurable — any string can be used as a marker with any modifier. When DefaultParameter is set, matched ranges use it as the parameter value. Matching follows CommonMark §6.2 flanking rules (simplified to the marker occurrence's neighbours): a marker opens only when left-flanking (next char is not whitespace, and not punctuation unless preceded by whitespace/punctuation) and closes only when right-flanking (mirrored). Markers made of _ additionally never open or close inside a word, so snake_case_name stays literal. Stray markers in arithmetic (2 * 3) never open.
public int Priority{ get }
public string Identity{ get }
public string MarkupTriggers{ get }
public string TypingTriggers{ get }
public bool CanWrap{ get }
public override void Reset()
public override string Apply()
public override int TryMatch()
public override void Finalize()