Skip to content

Commit b4b66f6

Browse files
camelidehuss
andcommitted
Fix trimming of lint docs
It was removing all the indentation before. Co-authored-by: Eric Huss <eric@huss.org>
1 parent 5bb68c3 commit b4b66f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tools/lint-docs/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ impl<'a> LintExtractor<'a> {
143143
Some((lineno, line)) => {
144144
let line = line.trim();
145145
if let Some(text) = line.strip_prefix("/// ") {
146-
doc_lines.push(text.trim().to_string());
147-
} else if line.starts_with("///") {
146+
doc_lines.push(text.to_string());
147+
} else if line == "///" {
148148
doc_lines.push("".to_string());
149149
} else if line.starts_with("// ") {
150150
// Ignore comments.

0 commit comments

Comments
 (0)