Skip to main content

count_djot

Function count_djot 

Source
pub fn count_djot(djot: &str, method: CountMethod) -> WordCharCounts
Expand description

Extract prose from Djot source, then count. The two-step (strip then count) is kept deliberately simple: djot_to_plain_text carries a pinned contract (table-anchor sentinel, single-\n block joins) and fusing the parse-and-count into one AST walk is the easiest way to accidentally create a third, silently-diverging “what is the text”.