This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -753,7 +753,7 @@ fn assoc_const(
753753) {
754754 write ! (
755755 w,
756- "{}{}const <a href=\" {}\" class=\" constant\" ><b>{}</b> </a>: {}" ,
756+ "{}{}const <a href=\" {}\" class=\" constant\" >{} </a>: {}" ,
757757 extra,
758758 it. visibility. print_with_space( it. def_id, cx) ,
759759 naive_assoc_href( it, link, cx) ,
Original file line number Diff line number Diff line change @@ -13,6 +13,21 @@ goto: file://|DOC_PATH|/test_docs/struct.Foo.html
1313assert-css: (".impl-items .method", {"font-weight": "600"}, ALL)
1414
1515goto: file://|DOC_PATH|/lib2/trait.Trait.html
16+
17+ // This is a complex selector, so here's how it works:
18+ //
19+ // * //*[@class='docblock type-decl'] — selects element of any tag with classes docblock and type-decl
20+ // * /pre[@class='rust trait'] — selects immediate child with tag pre and classes rust and trait
21+ // * /code — selects immediate child with tag code
22+ // * /a[@class='constant'] — selects immediate child with tag a and class constant
23+ // * //text() — selects child that is text node
24+ // * /parent::* — selects immediate parent of the text node (the * means it can be any tag)
25+ //
26+ // This uses '/parent::*' as a proxy for the style of the text node.
27+ // We can't just select the '<a>' because intermediate tags could be added.
28+ assert-count: ("//*[@class='docblock type-decl']/pre[@class='rust trait']/code/a[@class='constant']//text()/parent::*", 1)
29+ assert-css: ("//*[@class='docblock type-decl']/pre[@class='rust trait']/code/a[@class='constant']//text()/parent::*", {"font-weight": "400"})
30+
1631assert-count: (".methods .type", 1)
1732assert-css: (".methods .type", {"font-weight": "600"})
1833assert-count: (".methods .constant", 1)
You can’t perform that action at this time.
0 commit comments