Rollup merge of #95613 - GuillaumeGomez:fix-rustdoc-attr-display, r=notriddle
Fix rustdoc attribute display Fixes #81482. r? `@notriddle`
This commit is contained in:
commit
5925c8ee79
2 changed files with 13 additions and 1 deletions
|
@ -1002,7 +1002,12 @@ fn attributes(it: &clean::Item) -> Vec<String> {
|
|||
.iter()
|
||||
.filter_map(|attr| {
|
||||
if ALLOWED_ATTRIBUTES.contains(&attr.name_or_empty()) {
|
||||
Some(pprust::attribute_to_string(attr).replace('\n', "").replace(" ", " "))
|
||||
Some(
|
||||
pprust::attribute_to_string(attr)
|
||||
.replace("\\\n", "")
|
||||
.replace('\n', "")
|
||||
.replace(" ", " "),
|
||||
)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue