func summary_documentation(documentation: &[String]) -> [String]The first paragraph of a documentation block: leading blank lines are skipped, and the first blank line after prose ends the summary.
View Source
pub func summary_documentation(documentation: &[String]) -> [String] {
let summary: [String] = []
for line in documentation {
if line.byte_count == 0 {
if summary.is_empty() == false {
break
}
continue
}
summary.push(line.to_string())
}
summary
}