[][src]Function parse_hyperlinks::take_until_unmatched

pub fn take_until_unmatched(
    opening_bracket: char,
    closing_bracket: char
) -> impl Fn(&str) -> IResult<&str, &str>

This parser is designed to work inside the nom::sequence::delimited parser, e.g.: nom::sequence::delimited(tag("("), take_until_unmatched('(', ')'), tag(")"))(i) It skips nested brackets until it finds an extra closing bracket. This function is very similar to nom::bytes::complete::take_until(")"), except it also takes nested brackets. Escaped brackets e.g. \( and \) are not considered as brackets and are taken by default.