Auto merge of #85568 - GuillaumeGomez:search-result-extra-info, r=jsha
Search result extra info The CSS rule was not updated when we updated the search result, this fixes it: Before:  After:  r? `@jsha`
This commit is contained in:
commit
70cb58ce27
3 changed files with 17 additions and 2 deletions
|
|
@ -780,12 +780,12 @@ a {
|
|||
float: left;
|
||||
}
|
||||
|
||||
tr.result span.primitive::after {
|
||||
.result-name span.primitive::after {
|
||||
content: ' (primitive type)';
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
tr.result span.keyword::after {
|
||||
.result-name span.keyword::after {
|
||||
content: ' (keyword)';
|
||||
font-style: italic;
|
||||
}
|
||||
|
|
|
|||
11
src/test/rustdoc-gui/search-result-keyword.goml
Normal file
11
src/test/rustdoc-gui/search-result-keyword.goml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
goto: file://|DOC_PATH|/test_docs/index.html
|
||||
write: (".search-input", "CookieMonster")
|
||||
// Waiting for the search results to appear...
|
||||
wait-for: "#titles"
|
||||
// Note: The two next assert commands could be merged as one but readability would be
|
||||
// less good.
|
||||
//
|
||||
// Checking that the CSS is displaying " (keyword)"...
|
||||
assert: (".result-name span.keyword::after", {"content": '" (keyword)"'})
|
||||
// ... in italic.
|
||||
assert: (".result-name span.keyword::after", {"font-style": "italic"})
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
//! documentation generated so we can test each different features.
|
||||
|
||||
#![crate_name = "test_docs"]
|
||||
#![feature(doc_keyword)]
|
||||
|
||||
use std::fmt;
|
||||
|
||||
|
|
@ -91,3 +92,6 @@ pub fn check_list_code_block() {}
|
|||
pub enum AnEnum {
|
||||
WithVariants { and: usize, sub: usize, variants: usize },
|
||||
}
|
||||
|
||||
#[doc(keyword = "CookieMonster")]
|
||||
pub mod keyword {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue