Skip to content

Commit f3619ce

Browse files
committed
Auto merge of #31626 - mitaa:rdoc-srch-escape, r=alexcrichton
Maybe they should be Markdown rendered instead, though that doesn't really seem to work all that well. fixes #31059 r? @alexcrichton
2 parents 083dc5b + dcb3526 commit f3619ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustdoc/html/render.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ fn build_index(krate: &clean::Crate, cache: &mut Cache) -> String {
554554
ty: shortty(item),
555555
name: item.name.clone().unwrap(),
556556
path: fqp[..fqp.len() - 1].join("::"),
557-
desc: shorter(item.doc_value()),
557+
desc: Escape(&shorter(item.doc_value())).to_string(),
558558
parent: Some(did),
559559
search_type: get_index_search_type(&item, parent_basename),
560560
});
@@ -1065,7 +1065,7 @@ impl DocFolder for Cache {
10651065
ty: shortty(&item),
10661066
name: s.to_string(),
10671067
path: path.join("::").to_string(),
1068-
desc: shorter(item.doc_value()),
1068+
desc: Escape(&shorter(item.doc_value())).to_string(),
10691069
parent: parent,
10701070
search_type: get_index_search_type(&item, parent_basename),
10711071
});

0 commit comments

Comments
 (0)