Fix display of attributes in rustdoc
This commit is contained in:
parent
0677edc86e
commit
78698dd0fb
1 changed files with 6 additions and 1 deletions
|
@ -1002,7 +1002,12 @@ fn attributes(it: &clean::Item) -> Vec<String> {
|
||||||
.iter()
|
.iter()
|
||||||
.filter_map(|attr| {
|
.filter_map(|attr| {
|
||||||
if ALLOWED_ATTRIBUTES.contains(&attr.name_or_empty()) {
|
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 {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue