pub fn replace_toc_in_text(
current_text: &str,
new_toc: &str,
) -> TocReplaceResultExpand description
Attempt to find and replace an existing <!-- TOC -->...<!-- /TOC --> block in
current_text with new_toc.
Returns:
TocReplaceResult::NoMarkerswhen no markers were foundTocReplaceResult::NoChangewhen the existing block equalsnew_tocTocReplaceResult::Updatedwith the new full source text otherwise