Markdown.IsOrderedListDelimiter Method

Namespace
Kampute.DocToolkit.Support
Assembly
  • Kampute.DocToolkit.dll

Definition

Tracks the leading digits of a line to detect the delimiter of an ordered list marker (e.g., "1." or "1)").
public static bool IsOrderedListDelimiter(char c, bool atLineStart, ref int leadingDigits)

Parameters

c char
The character being written.
atLineStart bool
Indicates whether the character is at the start of a line (ignoring leading whitespace).
leadingDigits int
The number of digits written since the start of the line, or -1 if the line cannot start with an ordered list marker.

Returns

bool
true if the character is an ordered list delimiter that requires escaping; otherwise, false.

Remarks

Digits cannot be backslash-escaped in Markdown, so an ordered list marker is escaped through its delimiter.