markdown.state.detect_heading

markdown.state

detect_heading(line) -> level, content

Detect ATX heading (# through ######)