pub fn link_prefix(text: &str) -> (&str, bool)
Extracts a prefix of the text that is a link and also returns whether the parentheses and brackets in the link were balanced.