File tree 2 files changed +16
-1
lines changed
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -753,7 +753,7 @@ fn assoc_const(
753
753
) {
754
754
write ! (
755
755
w,
756
- "{}{}const <a href=\" {}\" class=\" constant\" ><b>{}</b> </a>: {}" ,
756
+ "{}{}const <a href=\" {}\" class=\" constant\" >{} </a>: {}" ,
757
757
extra,
758
758
it. visibility. print_with_space( it. def_id, cx) ,
759
759
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
13
13
assert-css: (".impl-items .method", {"font-weight": "600"}, ALL)
14
14
15
15
goto: 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
+
16
31
assert-count: (".methods .type", 1)
17
32
assert-css: (".methods .type", {"font-weight": "600"})
18
33
assert-count: (".methods .constant", 1)
You can’t perform that action at this time.
0 commit comments