Skip to content

Commit a87ff43

Browse files
Update src/librustdoc/html/static/js/search.js
Co-authored-by: Michael Howell <[email protected]>
1 parent 176b94a commit a87ff43

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustdoc/html/static/js/search.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1559,7 +1559,8 @@ class DocSearch {
15591559
// If there is more than one element or only separators in the query,
15601560
// we switch to literalSearch in any case.
15611561
query.literalSearch = parserState.totalElems > 1 ||
1562-
userQuery.replace(/[=, ]/g, "") === "";
1562+
/^[=, ]+$/.test(userQuery);
1563+
15631564
}
15641565
query.foundElems = query.elems.length + query.returned.length;
15651566
query.totalElems = parserState.totalElems;

0 commit comments

Comments
 (0)