Improve display of enum variants
Use h3 and h4 for the variant name and the "Fields" subheading. Remove the "of T" part of the "Fields" subheading. Remove border-bottom from "Fields" subheading. Move docblock below "Fields" listing.
This commit is contained in:
parent
e249ce6b23
commit
69df43b041
5 changed files with 89 additions and 48 deletions
|
@ -20,10 +20,10 @@ pub struct Foo(
|
|||
|
||||
// @has foo/enum.Bar.html
|
||||
// @has - '//pre[@class="rust enum"]' 'BarVariant(String),'
|
||||
// @matches - '//*[@id="variant.BarVariant.fields"]/h3' '^Tuple Fields of BarVariant$'
|
||||
// @matches - '//*[@id="variant.BarVariant.fields"]/h4' '^Tuple Fields$'
|
||||
// @has - '//*[@id="variant.BarVariant.field.0"]' '0: String'
|
||||
// @has - '//*[@id="variant.BarVariant.fields"]//*[@class="docblock"]' 'Hello docs'
|
||||
// @matches - '//*[@id="variant.FooVariant.fields"]/h3' '^Fields of FooVariant$'
|
||||
// @matches - '//*[@id="variant.FooVariant.fields"]/h4' '^Fields$'
|
||||
pub enum Bar {
|
||||
BarVariant(
|
||||
/// Hello docs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue