pub fn to_content_range(&self, chunk: &CheckableChunk) -> Result<Range> {
        if chunk.fragment_count() == 0 {
            return Err(Error::Span("Chunk contains 0 fragments".to_string()));
        }
        for (fragment_range, fragment_span) in chunk
            .iter()
            // pre-filter to reduce too many calls to `extract_sub_range`
            .filter(|(fragment_range, fragment_span)| {
                log::trace!(
                    "extracting sub from {self:?} ::: {fragment_range:?} -> {fragment_span:?}",
                );
                fragment_span.start.line <= self.start.line
                    && self.end.line <= fragment_span.end.line
            })
        {
            match extract_sub_range_from_span(
                chunk.as_str(),
                *fragment_span,
                fragment_range.clone(),
                *self,
            ) {
                Ok(fragment_sub_range) => return Ok(fragment_sub_range),
                Err(_e) => continue,
            }
        }
        Err(Error::Span(
            "The chunk internal map from range to span did not contain an overlapping entry"
                .to_string(),
        ))
    }
Convert a given span `self` into a `Range`

The `Chunk` has a associated `Span` (or a set of `Range` -> `Span`
mappings) which are used to map.
doc-chunks/src/span.rs