pub fn normalize_reference_label(label: &str) -> StringExpand description
Normalize a reference label for definition matching: collapse internal whitespace runs to a single space, trim, and lowercase (CommonMark-style label matching). Both the defined labels and the shortcut references checked against them are run through this function, so matching is case- and whitespace-insensitive. Biasing toward matching keeps a real shortcut link atomic even when its use and definition differ only in case or whitespace.