diff options
| author | Camelid <camelidcamel@gmail.com> | 2020-12-06 14:11:02 -0800 |
|---|---|---|
| committer | Camelid <camelidcamel@gmail.com> | 2020-12-06 14:11:02 -0800 |
| commit | b4b66f6e2443cd05e163ac2577620ed06ea265e9 (patch) | |
| tree | 9ef63d48c3a516bfad87d08bf41814867e9f522b | |
| parent | 5bb68c31f8cef24174a7d3499de6b4ebea069900 (diff) | |
| download | rust-b4b66f6e2443cd05e163ac2577620ed06ea265e9.tar.gz rust-b4b66f6e2443cd05e163ac2577620ed06ea265e9.zip | |
Fix trimming of lint docs
It was removing all the indentation before. Co-authored-by: Eric Huss <eric@huss.org>
| -rw-r--r-- | src/tools/lint-docs/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/lint-docs/src/lib.rs b/src/tools/lint-docs/src/lib.rs index 326b7948098..ea54a351e03 100644 --- a/src/tools/lint-docs/src/lib.rs +++ b/src/tools/lint-docs/src/lib.rs @@ -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. |
