Skip to content

Commit 2872937

Browse files
authored
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`
2 parents d95948c + b4b66f6 commit 2872937

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)