Skip to main content

reflow_code_body

Function reflow_code_body 

Source
pub fn reflow_code_body(
    body: &str,
    cfg: &CodeLang,
    splitter: &dyn SentenceSplitter,
    format_code: bool,
) -> String
Expand description

Reflow the body of a Region::Code.

cfg carries the per-language marker configuration. splitter is the active sentence splitter (used for comment prose). When format_code is true and cfg.formatter is set, the post-comment-reflow body is piped through that formatter; failures degrade gracefully by returning the pre-formatter body and emitting a diagnostic on stderr.