Skip to content

Commit

Permalink
Rollup merge of #79750 - camelid:fix-lint-docs-trimming, r=Mark-Simul…
Browse files Browse the repository at this point in the history
…acrum

Fix trimming of lint docs

Fixes #79748.

It was removing all the indentation before.

r? `@Mark-Simulacrum`
  • Loading branch information
tmandry committed Dec 9, 2020
2 parents d95948c + b4b66f6 commit 2872937
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tools/lint-docs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 2872937

Please sign in to comment.