Fix display of attributes in rustdoc

This commit is contained in:
Guillaume Gomez 2022-04-03 13:40:43 +02:00
parent 0677edc86e
commit 78698dd0fb

View file

@ -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
}