Rollup merge of #61263 - GuillaumeGomez:valid-html, r=Manishearth

Don't generate div inside header (h4/h3/h...) elements

Fixes #60865.

According to the HTML spec, we're not supposed to put `div` elements inside heading elements (h4/h3/h...). It doesn't change the display as far as I could tell.

r? @QuietMisdreavus
This commit is contained in:
Mazdak Farrokhzad
2019-06-01 06:50:02 +02:00
committed by GitHub
2 changed files with 4 additions and 4 deletions

View File

@@ -3804,7 +3804,7 @@ fn render_attributes(w: &mut dyn fmt::Write, it: &clean::Item, top: bool) -> fmt
}
}
if attrs.len() > 0 {
write!(w, "<div class=\"docblock attributes{}\">{}</div>",
write!(w, "<span class=\"docblock attributes{}\">{}</span>",
if top { " top-attr" } else { "" }, &attrs)?;
}
Ok(())