Function parse_hyperlinks::parser::markdown::md_text2dest
source · pub fn md_text2dest(
i: &str
) -> IResult<&str, (Cow<'_, str>, Cow<'_, str>, Cow<'_, str>)>
Expand description
Parses a Markdown inline link.
This parser expects to start at the beginning of the link [
to succeed.
use parse_hyperlinks::parser::Link;
use parse_hyperlinks::parser::markdown::md_text2dest;
use std::borrow::Cow;
assert_eq!(
md_text2dest(r#"[text](<destination> "title")abc"#),
Ok(("abc", (Cow::from("text"), Cow::from("destination"), Cow::from("title"))))
);