fn extract_title(md: &str) -> Option<String>Expand description
Scan a Markdown string for the first heading of any level and return its
plain-text content. Used to populate the <title> element.
Handles headings that contain inline emphasis, code spans, or other inline
elements by concatenating all Text and Code events seen between the
opening and closing heading tags.