fn check_chunk<'a>(
    origin: ContentOrigin,
    chunk: &'a CheckableChunk,
    tokenizer: &Tokenizer,
    rules: &Rules,
) -> Vec<Suggestion<'a>> {
    // TODO We should control which parts need to be ignored of the markdown
    // entities, however the `NlpRulesConfig`, which is the only configuration
    // we receive in the constructor does not contain the same quirks (or in
    // fact any other similar settings) as the Hunspell one, so we cannot obtain
    // this setting, therefore we fallback to default
    let plain = chunk.erase_cmark(&Default::default());
    log::trace!("{plain:?}");
    let txt = plain.as_str();

    let mut acc = Vec::with_capacity(32);

    let nlpfixes = rules.suggest(txt, tokenizer);
    if nlpfixes.is_empty() {
        return Vec::new();
    }

    'nlp: for fix in nlpfixes {
        let message = fix.message();
        let replacements = fix.replacements();
        let start = fix.span().char().start;
        let end = fix.span().char().end;
        if start > end {
            log::debug!("BUG: crate nlprule yielded a negative range {:?} for chunk in {}, please file a bug", start..end, &origin);
            continue 'nlp;
        }
        let range = start..end;
        acc.extend(
            plain
                .find_spans(range)
                .into_iter()
                .map(|(range, span)| Suggestion {
                    detector: Detector::NlpRules,
                    range,
                    span,
                    origin: origin.clone(),
                    replacements: replacements.to_vec(),
                    chunk,
                    description: Some(message.to_owned()),
                }),
        );
    }

    acc
}
Check the plain text contained in chunk, which can be one or more sentences.
src/checker/nlprules.rs