[−][src]Function parse_hyperlinks::parser::markdown::md_link
pub fn md_link(i: &str) -> IResult<&str, (&str, Cow<'_, str>, &str)>
Parse a markdown link.
This parser expects to start at the beginning of the link [ to succeed. It
returns either Ok((i, (link_text, link_destination, link_title))) or some
error.
use parse_hyperlinks::parser::markdown::md_link; use std::borrow::Cow; assert_eq!( md_link(r#"[name](<destination> "title")abc"#), Ok(("abc", ("name", Cow::from("destination"), "title"))) );