Back to API Reference
Class

CodeSpanRule

sealed

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.

Remarks

Standalone rule — register via AddRule without a modifier. If no matching closing run is found, the rule does not consume the input (the backticks are treated as literal text). This matches CommonMark's non-forgiving close behavior.
public int Priority{ get }
public bool IsStandalone{ get }
public int TryMatch()

See Also