[−][src]Function parse_hyperlinks::parser::restructured_text::rst_link_ref_def
pub fn rst_link_ref_def(i: &str) -> IResult<&str, Link<'_>>
Parse a RestructuredText link reference definition.
This parser always returns an empty link_title as Cow::Borrowed("").
use parse_hyperlinks::parser::Link; use parse_hyperlinks::parser::restructured_text::rst_link_ref_def; use std::borrow::Cow; assert_eq!( rst_link_ref_def(" .. _`label`: destination\nabc"), Ok(("\nabc", Link::RefDef(Cow::from("label"), Cow::from("destination"), Cow::from("")))) );
Here some examples for link references:
.. _Python home page: http://www.python.org
.. _`Python: home page`: http://www.python.org
See unit test test_rst_link_ref_def() for more examples.