Skip to content

Commit 78698dd

Browse files
Fix display of attributes in rustdoc
1 parent 0677edc commit 78698dd

File tree

1 file changed

+6
-1
lines changed
  • src/librustdoc/html/render

1 file changed

+6
-1
lines changed

src/librustdoc/html/render/mod.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,12 @@ fn attributes(it: &clean::Item) -> Vec<String> {
10021002
.iter()
10031003
.filter_map(|attr| {
10041004
if ALLOWED_ATTRIBUTES.contains(&attr.name_or_empty()) {
1005-
Some(pprust::attribute_to_string(attr).replace('\n', "").replace(" ", " "))
1005+
Some(
1006+
pprust::attribute_to_string(attr)
1007+
.replace("\\\n", "")
1008+
.replace('\n', "")
1009+
.replace(" ", " "),
1010+
)
10061011
} else {
10071012
None
10081013
}

0 commit comments

Comments
 (0)