We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e062121 + 314ef59 commit f99a892Copy full SHA for f99a892
src/librustdoc/html/static/search.js
@@ -1024,7 +1024,7 @@ window.initSearch = function(rawSearchIndex) {
1024
var description = document.createElement("div");
1025
description.className = "desc";
1026
var spanDesc = document.createElement("span");
1027
- spanDesc.innerText = item.desc + "\u00A0";
+ spanDesc.insertAdjacentHTML("beforeend", item.desc);
1028
1029
description.appendChild(spanDesc);
1030
wrapper.appendChild(description);
src/test/rustdoc-gui/search-result-description.goml
@@ -0,0 +1,5 @@
1
+// This test is to ensure that the codeblocks are correctly rendered in the search results.
2
+goto: file://|DOC_PATH|/test_docs/index.html?search=some_more_function
3
+// Waiting for the search results to appear...
4
+wait-for: "#titles"
5
+assert: (".search-results .desc code", "format!")
0 commit comments