Rollup merge of #79750 - camelid:fix-lint-docs-trimming, r=Mark-Simulacrum
Fix trimming of lint docs Fixes #79748. It was removing all the indentation before. r? `@Mark-Simulacrum`
This commit is contained in:
commit
287293732f
@ -143,8 +143,8 @@ impl<'a> LintExtractor<'a> {
|
||||
Some((lineno, line)) => {
|
||||
let line = line.trim();
|
||||
if let Some(text) = line.strip_prefix("/// ") {
|
||||
doc_lines.push(text.trim().to_string());
|
||||
} else if line.starts_with("///") {
|
||||
doc_lines.push(text.to_string());
|
||||
} else if line == "///" {
|
||||
doc_lines.push("".to_string());
|
||||
} else if line.starts_with("// ") {
|
||||
// Ignore comments.
|
||||
|
Loading…
Reference in New Issue
Block a user