Skip to main content

doc_block_content

Function doc_block_content 

Source
pub fn doc_block_content(source: &str, span: Span) -> String
Expand description

Extract the body content of a doc-block token from its source span. Strips the leading and trailing --- marker lines and returns the body verbatim. If every non-empty content line begins with the same horizontal whitespace prefix (e.g., because the doc block sits inside a brace-form commons body), that common prefix is removed so the body reads naturally when emitted as JSDoc.