[−][src]Function parse_hyperlinks::parser::html::html_link
pub fn html_link(
i: &str
) -> IResult<&str, (Cow<'_, str>, Cow<'_, str>, Cow<'_, str>)>
Parse an HTML hyperlink.
The parser expects to start at the link start (<
) to succeed.
use parse_hyperlinks::parser::html::html_link; use std::borrow::Cow; assert_eq!( html_link(r#"<a href="destination" title="title">name</a>abc"#), Ok(("abc", (Cow::from("name"), Cow::from("destination"), Cow::from("title")))) );
It returns either Ok((i, (link_name, link_destination, link_title)))
or some error.