Lines Matching full:lines
4 //! non-empty adjacent lines, delimited by sequences of blank (whitespace only) lines.
10 pub fn process_doc_comment(lines: Vec<String>, name: &str, preprocess: bool) -> Vec<Method> { in process_doc_comment()
12 // we need to split so we could handle the lines correctly in process_doc_comment()
14 // we also need to remove leading and trailing blank lines in process_doc_comment()
15 let mut lines: Vec<&str> = lines in process_doc_comment() localVariable
21 while let Some(true) = lines.last().map(|s| is_blank(s)) { in process_doc_comment()
22 lines.pop(); in process_doc_comment()
26 for line in lines.iter_mut() { in process_doc_comment()
32 if lines.is_empty() { in process_doc_comment()
39 if let Some(first_blank) = lines.iter().position(|s| is_blank(s)) { in process_doc_comment()
41 let paragraphs = split_paragraphs(&lines); in process_doc_comment()
46 let short = lines[..first_blank].join("\n"); in process_doc_comment()
47 let long = lines.join("\n"); in process_doc_comment()
57 let s = merge_lines(&lines); in process_doc_comment()
60 lines.join("\n") in process_doc_comment()
67 fn split_paragraphs(lines: &[&str]) -> Vec<String> { in split_paragraphs()
70 let slice = &lines[last_line..]; in split_paragraphs()
101 fn merge_lines(lines: &[&str]) -> String { in merge_lines()
102 lines.iter().map(|s| s.trim()).collect::<Vec<_>>().join(" ") in merge_lines()