Skip to content

Commit

Permalink
Correctly handle comments in attributes in doctests source code
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Dec 13, 2024
1 parent 5a6036a commit de16ed3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/librustdoc/doctest/make.rs
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,8 @@ fn handle_attr(mod_attr_pending: &mut String, source_info: &mut SourceInfo, edit
mod_attr_pending.clear();
} else if mod_attr_pending.ends_with('\\') {
mod_attr_pending.push('n');
} else {
mod_attr_pending.push_str("\n");
}
}

Expand Down

0 comments on commit de16ed3

Please sign in to comment.