Don't replace : for @crate query searching

Since rustdoc support `fn:`, `trait:` special searching
This commit is contained in:
Folyd 2024-06-22 17:36:43 -07:00
parent 4ccbf8d99a
commit 43c4e37167

View file

@ -96,7 +96,7 @@ export default class CrateDocSearch {
static parseCrateDocsSearchKeyword(query) {
query = query.replaceAll("@", "").trim();
let [crateName, ...keyword] = query.split(/\s|:+/i);
return [crateName, keyword.filter(k => k).join('::')];
let [crateName, ...keyword] = query.split(/\s/i);
return [crateName, keyword.filter(k => k).join('')];
}
}