Skip to content

Commit 1b0c4fd

Browse files
authored
Merge pull request #261 from wpaccessibility/fix-search-queries
Add support for leading wildcards in search
2 parents 9f5893a + 79ce093 commit 1b0c4fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

assets/js/wp-a11y-docs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ jtd.onReady(function() {
344344
var results = index.query(function(queryObj) {
345345
var tokens = lunr.tokenizer(input);
346346
queryObj.term(tokens, { boost: 10 });
347-
queryObj.term(tokens, { wildcard: lunr.Query.wildcard.TRAILING });
347+
queryObj.term(tokens, { wildcard: lunr.Query.wildcard.TRAILING | lunr.Query.wildcard.LEADING });
348348
});
349349

350350
// Fuzzy fallback

0 commit comments

Comments
 (0)