plusparse/scanner library
Low-level, single-pass line helpers shared by the block parser. No regex — everything is hand-written character scanning (ported 1:1 from the Rust plusparse scanner).
Functions
-
checkboxMarker(
String trimmed) → ({bool checked, String content})? -
[x]/[ ]checkbox. Returns (checked, content). -
indentWidth(
String line) → int - Number of leading-indent columns (space = 1, tab = 4).
-
isBlank(
String line) → bool -
isHeading(
String trimmed) → ({String content, int level})? -
ATX heading: 1–6
#followed by a space. Returns (level, content). -
isHr(
String trimmed) → bool -
Thematic break: 3+ of
-,*, or_(optionally space-separated), or⸻. -
orderedMarker(
String trimmed) → ({String content, int number})? -
N.orN)ordered marker. Returns (number, content). -
radioMarker(
String trimmed) → ({String content, bool selected})? -
(x)/( )radio. Returns (selected, content). -
stripIndent(
String line, int max) → String -
Remove up to
maxcolumns of leading indentation, returning the remainder. -
unorderedMarker(
String trimmed) → String? -
-,*, or+bullet. Returns the content after the marker.