[][src]Function markedit::text_containing

pub fn text_containing<S: AsRef<str>>(needle: S) -> impl Matcher

Match an Event::Text event which contains the provided string.

Not to be confused with exact_text().

use markedit::Matcher;
use pulldown_cmark::Event;

assert_eq!(
    markedit::text_containing("Something").is_in(markedit::parse("Something")),
    true,
);
assert_eq!(
    markedit::text_containing("Something").is_in(markedit::parse("Something Else")),
    true,
);