Skip to main content

atx_heading

Function atx_heading 

Source
pub fn atx_heading(line: &str) -> Option<(usize, &str)>
Expand description

An ATX heading’s level and text: ^ {0,3}(#{1,6})\s+(.+?)\s*$, with a closing # run stripped when a space or tab precedes it. A bare ## or ## is not a heading; ## (whitespace for text) is one with empty text, which ends sections but can never be selected.