File tree Expand file tree Collapse file tree 2 files changed +15
-19
lines changed
src/librustdoc/html/static Expand file tree Collapse file tree 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 */
888888 justify-content : start;
889889 flex : 3 ;
890890}
891- .search-results .result-name span .alias {
891+ .search-results .result-name .alias {
892892 color : var (--search-results-alias-color );
893893}
894894.search-results .result-name .grey {
@@ -904,6 +904,9 @@ so that we can apply CSS-filters to change the arrow color in themes */
904904 max-width : calc (100% - var (--search-typename-width ));
905905 display : inline-block;
906906}
907+ .search-results .result-name .path > * {
908+ display : inline;
909+ }
907910
908911.popover {
909912 position : absolute;
Original file line number Diff line number Diff line change @@ -2108,29 +2108,22 @@ function initSearch(rawSearchIndex) {
21082108 const resultName = document . createElement ( "div" ) ;
21092109 resultName . className = "result-name" ;
21102110
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 ) ;
21222115
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>` ;
21242121 }
2125-
21262122 resultName . insertAdjacentHTML (
21272123 "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>\
21322126</div>` ) ;
2133- link . appendChild ( resultName ) ;
21342127
21352128 const description = document . createElement ( "div" ) ;
21362129 description . className = "desc" ;
You can’t perform that action at this time.
0 commit comments