Repository: huhu/rust-search-extension (language: rust)

Issue:
Incorrect redirection when performing searches in the 'std' documentation
When performing search with query `prelude::compile_error` (select the first match by default), the expected behavior is to redirect users to [this link](https://doc.rust-lang.org/std/prelude/v1/index.html#reexport.compile_error). However, the current redirection is leading to [this invalid link](https://doc.rust-lang.org/std/prelude/v1/import.compile_error.html).


Discussion / hints:

Fix patch:
diff --git a/extension/search/docs/base.js b/extension/search/docs/base.js
index 276e80c2..0f969e9e 100644
--- a/extension/search/docs/base.js
+++ b/extension/search/docs/base.js
@@ -568,6 +568,9 @@ class DocSearch {
             displayPath = path + "::";
             href = rootPath + path.replace(/::/g, "/") + "/" +
                 name + "/index.html";
+        } else if (type === "import") {
+            displayPath = item.path + "::";
+            href = rootPath + item.path.replace(/::/g, "/") + "/index.html#reexport." + name;
         } else if (type === "primitive" || type === "keyword") {
             displayPath = "";
             href = rootPath + path.replace(/::/g, "/") +


Test patch: