Skip to content

Commit 1297235

Browse files
authored
Rollup merge of #86361 - GuillaumeGomez:missing-backslashes, r=jsha
Add missing backslashes to prevent unwanted newlines in rustdoc HTML Just adding some forgotten backslashes. r? `@jsha`
2 parents 05ba958 + a2a006d commit 1297235

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/librustdoc/html/render/print_item.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ fn item_union(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, s: &clean::Uni
864864
if fields.peek().is_some() {
865865
write!(
866866
w,
867-
"<h2 id=\"fields\" class=\"fields small-section-header\">
867+
"<h2 id=\"fields\" class=\"fields small-section-header\">\
868868
Fields<a href=\"#fields\" class=\"anchor\"></a></h2>"
869869
);
870870
for (field, ty) in fields {
@@ -953,8 +953,8 @@ fn item_enum(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, e: &clean::Enum
953953
if !e.variants.is_empty() {
954954
write!(
955955
w,
956-
"<h2 id=\"variants\" class=\"variants small-section-header\">
957-
Variants{}<a href=\"#variants\" class=\"anchor\"></a></h2>\n",
956+
"<h2 id=\"variants\" class=\"variants small-section-header\">\
957+
Variants{}<a href=\"#variants\" class=\"anchor\"></a></h2>",
958958
document_non_exhaustive_header(it)
959959
);
960960
document_non_exhaustive(w, it);
@@ -1139,7 +1139,7 @@ fn item_struct(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, s: &clean::St
11391139
if fields.peek().is_some() {
11401140
write!(
11411141
w,
1142-
"<h2 id=\"fields\" class=\"fields small-section-header\">
1142+
"<h2 id=\"fields\" class=\"fields small-section-header\">\
11431143
Fields{}<a href=\"#fields\" class=\"anchor\"></a></h2>",
11441144
document_non_exhaustive_header(it)
11451145
);

0 commit comments

Comments
 (0)