[−][src]Function parse_hyperlinks::parser::markdown::md_link_ref
pub fn md_link_ref(
i: &str
) -> IResult<&str, (Cow<'_, str>, Cow<'_, str>, Cow<'_, str>)>
Matches a markdown link reference.
The caller must guarantee, that the parser starts at first character of the
input or at the first character of a line.
It returns either Ok((i, (link_text, link_destination, link_title)))
or
some error.
use parse_hyperlinks::parser::markdown::md_link_ref; use std::borrow::Cow; assert_eq!( md_link_ref(" [name]: <destination> 'title'\nabc"), Ok(("\nabc", (Cow::from("name"), Cow::from("destination"), Cow::from("title")))) );