[−][src]Function parse_hyperlinks::parser::markdown::md_link_ref
pub fn md_link_ref(i: &str) -> IResult<&str, (&str, Cow<'_, str>, &str)>
Matches a markdown link reference.
The parser expects to start at the beginning of link's 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", ("name", Cow::from("destination"), "title"))) );