File tree 2 files changed +15
-19
lines changed
src/librustdoc/html/static
2 files changed +15
-19
lines changed Original file line number Diff line number Diff line change @@ -888,7 +888,7 @@ so that we can apply CSS-filters to change the arrow color in themes */
888
888
justify-content : start;
889
889
flex : 3 ;
890
890
}
891
- .search-results .result-name span .alias {
891
+ .search-results .result-name .alias {
892
892
color : var (--search-results-alias-color );
893
893
}
894
894
.search-results .result-name .grey {
@@ -904,6 +904,9 @@ so that we can apply CSS-filters to change the arrow color in themes */
904
904
max-width : calc (100% - var (--search-typename-width ));
905
905
display : inline-block;
906
906
}
907
+ .search-results .result-name .path > * {
908
+ display : inline;
909
+ }
907
910
908
911
.popover {
909
912
position : absolute;
Original file line number Diff line number Diff line change @@ -2108,29 +2108,22 @@ function initSearch(rawSearchIndex) {
2108
2108
const resultName = document . createElement ( "div" ) ;
2109
2109
resultName . className = "result-name" ;
2110
2110
2111
- if ( item . is_alias ) {
2112
- const alias = document . createElement ( "span" ) ;
2113
- alias . className = "alias" ;
2114
-
2115
- const bold = document . createElement ( "b" ) ;
2116
- bold . innerText = item . alias ;
2117
- alias . appendChild ( bold ) ;
2118
-
2119
- alias . insertAdjacentHTML (
2120
- "beforeend" ,
2121
- "<i class=\"grey\"> - see </i>" ) ;
2111
+ resultName . insertAdjacentHTML (
2112
+ "beforeend" ,
2113
+ `<span class="typename">${ typeName } </span>` ) ;
2114
+ link . appendChild ( resultName ) ;
2122
2115
2123
- resultName . appendChild ( alias ) ;
2116
+ let alias = " " ;
2117
+ if ( item . is_alias ) {
2118
+ alias = ` <div class="alias">\
2119
+ <b>${ item . alias } </b><i class="grey"> - see </i>\
2120
+ </div>` ;
2124
2121
}
2125
-
2126
2122
resultName . insertAdjacentHTML (
2127
2123
"beforeend" ,
2128
- `\
2129
- <span class="typename">${ typeName } </span>\
2130
- <div class="path">\
2131
- ${ item . displayPath } <span class="${ type } ">${ name } </span>\
2124
+ `<div class="path">${ alias } \
2125
+ ${ item . displayPath } <span class="${ type } ">${ name } </span>\
2132
2126
</div>` ) ;
2133
- link . appendChild ( resultName ) ;
2134
2127
2135
2128
const description = document . createElement ( "div" ) ;
2136
2129
description . className = "desc" ;
You can’t perform that action at this time.
0 commit comments