File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed
src/librustdoc/html/static/js Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,10 @@ const ROOT_PATH = typeof window !== "undefined" ? window.rootPath : "../";
149149const UNBOXING_LIMIT = 5 ;
150150
151151// used for search query verification
152- const REGEX_IDENT = / \p{ ID_Start} \p{ ID_Continue} * | _ \p{ ID_Continue} + / uy;
152+ // because searches are often performed using substrings of identifiers,
153+ // and not just full identiferes, we allow them to start with chars that otherwise
154+ // can only appear in the middle of identifiers
155+ const REGEX_IDENT = / \p{ ID_Continue} + / uy;
153156const REGEX_INVALID_TYPE_FILTER = / [ ^ a - z ] / ui;
154157
155158const MAX_RESULTS = 200 ;
Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ const PARSED = [
165165 foundElems : 0 ,
166166 userQuery : "_:" ,
167167 returned : [ ] ,
168- error : "Unexpected `_` (not a valid identifier )" ,
168+ error : "Unexpected `_` in type filter (before `:` )" ,
169169 } ,
170170 {
171171 query : "ab:" ,
Original file line number Diff line number Diff line change 1+ // regression test for https://github.com/rust-lang/rust/issues/147763
2+
3+ const EXPECTED = {
4+ 'query' : '8' ,
5+ 'others' : [
6+ {
7+ 'path' : 'std' ,
8+ 'name' : 'i8' ,
9+ 'href' : '../std/primitive.i8.html' ,
10+ } ,
11+ ]
12+ } ;
You can’t perform that action at this time.
0 commit comments