pub fn parse_heading_line(line: &str) -> Option<HeadingLine>Expand description
Locate the parts of a heading line, or return None when line is not a
heading.
Applies the same keyword and priority grammars as the extraction path, so a
heading the extractor reads one way cannot be rewritten another way. See
HeadingLine for what the result addresses.
let line = "## TODO [#A] Write the report";
let heading = parse_heading_line(line).expect("a heading");
assert_eq!(&line[heading.priority.expect("a cookie").range], "[#A]");