rustdoc: clean up DOM by removing .dockblock-short p

On https://doc.rust-lang.org/nightly/std/ this reduces the number out of
`document.querySelectorAll("*").length` from 1278 to 1103.
This commit is contained in:
Michael Howell
2022-09-13 14:22:38 -07:00
parent 1ce51982b8
commit 11a52dc61a
5 changed files with 26 additions and 38 deletions

View File

@@ -31,15 +31,9 @@ compare-elements-position: (
)
// Ensure no wrap
compare-elements-position-near: (
"//*[@class='item-left module-item']//a[text()='replaced_function']",
"//*[@class='item-right docblock-short']//p[text()='a thing with a label']",
{"y": 2},
)
// compare parent elements
compare-elements-position: (
"//*[@class='item-left module-item']//a[text()='replaced_function']/..",
"//*[@class='item-right docblock-short']//p[text()='a thing with a label']/..",
"//*[@class='item-right docblock-short'][text()='a thing with a label']",
("y"),
)
@@ -60,19 +54,13 @@ compare-elements-position: (
)
// Ensure wrap
compare-elements-position-near-false: (
"//*[@class='item-left module-item']//a[text()='replaced_function']",
"//*[@class='item-right docblock-short']//p[text()='a thing with a label']",
{"y": 12},
)
// compare parent elements
compare-elements-position-false: (
"//*[@class='item-left module-item']//a[text()='replaced_function']/..",
"//*[@class='item-right docblock-short']//p[text()='a thing with a label']/..",
"//*[@class='item-right docblock-short'][text()='a thing with a label']",
("y"),
)
compare-elements-position-false: (
".item-left .stab.deprecated",
"//*[@class='item-right docblock-short']//p[text()='a thing with a label']",
"//*[@class='item-right docblock-short'][text()='a thing with a label']",
("y"),
)