mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
#4649 polish code
This commit is contained in:
parent
ebac7f7149
commit
0fb7f72448
@ -428,12 +428,12 @@ var Search = {
|
||||
var valid = true;
|
||||
|
||||
// check if all requirements are matched
|
||||
var filteredTerms = // as search terms with length < 3 are discarded: ignore
|
||||
var filteredTermCount = // as search terms with length < 3 are discarded: ignore
|
||||
searchterms.filter(function(term){return term.length > 2}).length
|
||||
var allRequirementsMatched = fileMap[file].length != searchterms.length &&
|
||||
fileMap[file].length != filteredTerms
|
||||
if (allRequirementsMatched)
|
||||
continue;
|
||||
if (
|
||||
fileMap[file].length != searchterms.length &&
|
||||
fileMap[file].length != filteredTermCount
|
||||
) continue;
|
||||
|
||||
// ensure that none of the excluded terms is in the search result
|
||||
for (i = 0; i < excluded.length; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user