pub(crate) fn locate_label(
src: &str,
start: usize,
end: usize,
) -> Option<(ParsedLabel, usize)>Expand description
Locate the first <label> token in src[start..end], returning the parsed
label and the byte offset just past its >. Unlike strip_trailing_label
this finds a label anywhere in the range, so the heading parser can detect
a label that is not the trailing element (e.g. = Title <id> trailing) and
flag it (MOS0048) instead of silently swallowing it into the text.