Skip to main content

is_rule

Function is_rule 

fn is_rule(line: &str) -> bool
Expand description

Is this comment line a section rule — three or more dashes and nothing else?

A rule introduces a group of features, so what precedes it belongs to the group’s banner rather than to the feature below it. Three, not two, is what keeps a rule distinguishable from is_marker’s --: the two markers mean opposite things (a rule keeps what is below it, the D37 marker keeps what is above), so a shape that matched both would silently publish the wrong half.