Resolve intra-doc links in summary desc
Before:  After: 
This commit is contained in:
parent
312b894cc1
commit
20915d471a
4 changed files with 61 additions and 11 deletions
|
@ -292,13 +292,14 @@ impl<'a, 'tcx> DocFolder for CacheBuilder<'a, 'tcx> {
|
|||
// which should not be indexed. The crate-item itself is
|
||||
// inserted later on when serializing the search-index.
|
||||
if item.def_id.index().map_or(false, |idx| idx != CRATE_DEF_INDEX) {
|
||||
let desc = item.doc_value().map_or_else(String::new, |x| {
|
||||
short_markdown_summary(&x.as_str(), &item.link_names(&self.cache))
|
||||
});
|
||||
self.cache.search_index.push(IndexItem {
|
||||
ty: item.type_(),
|
||||
name: s.to_string(),
|
||||
path: path.join("::"),
|
||||
desc: item
|
||||
.doc_value()
|
||||
.map_or_else(String::new, |x| short_markdown_summary(&x.as_str())),
|
||||
desc,
|
||||
parent,
|
||||
parent_idx: None,
|
||||
search_type: get_index_search_type(&item, &self.empty_cache, self.tcx),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue