md_img

Function md_img 

Source
pub fn md_img(i: &str) -> IResult<&str, (Cow<'_, str>, Cow<'_, str>)>
Expand description

Parse a Markdown image.

It returns either Ok((i, (img_alt, img_src))) or some error.

The parser expects to start at the link start (!) to succeed.

use parse_hyperlinks;
use parse_hyperlinks::parser::markdown_img::md_img;
use std::borrow::Cow;

assert_eq!(
  md_img("![my Dog](/images/my&dog.png)abc"),
  Ok(("abc", (Cow::from("my Dog"), Cow::from("/images/my&dog.png"))))
);