Skip to main content

doc_first_paragraph_joined

Function doc_first_paragraph_joined 

Source
pub fn doc_first_paragraph_joined(doc: &str) -> String
Expand description

Return the first paragraph of a doc comment as a single joined line.

Collects lines until the first blank line, trims each, then joins with a space. This handles wrapped sentences like:

Convert HTML to Markdown, returning
a `ConversionResult`.

which would otherwise be truncated at the comma when callers use .lines().next().