We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae0e45c commit bfd01b7Copy full SHA for bfd01b7
src/librustdoc/html/format.rs
@@ -237,15 +237,23 @@ impl<'a> fmt::Display for WhereClause<'a> {
237
clause.push(',');
238
}
239
240
+
241
+ if end_newline {
242
+ //add a space so stripping <br> tags and breaking spaces still renders properly
243
+ if f.alternate() {
244
+ clause.push(' ');
245
+ } else {
246
+ clause.push_str(" ");
247
+ }
248
249
250
if !f.alternate() {
251
clause.push_str("</span>");
252
let padding = repeat(" ").take(indent + 4).collect::<String>();
253
clause = clause.replace("<br>", &format!("<br>{}", padding));
254
clause.insert_str(0, &repeat(" ").take(indent.saturating_sub(1))
255
.collect::<String>());
- if end_newline {
- clause.push(' ');
- } else {
256
+ if !end_newline {
257
clause.insert_str(0, "<br>");
258
259
0 commit comments