make fuzzy search a bit less fuzzy (#13996) [backport:1.2]

This commit is contained in:
Miran 2020-04-16 20:22:32 +02:00 • committed by GitHub
commit 06e0c75ba9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -303,7 +303,7 @@ proc dosearch(value: cstring): Element =
matches.add((db[i], score))
matches.sort(proc(a, b: auto): int = b[1] - a[1])
for i in 0 ..< min(matches.len, 19):
for i in 0 ..< min(matches.len, 29):
matches[i][0].innerHTML = matches[i][0].getAttribute("data-doc-search-tag")
ul.add(tree("LI", cast[Element](matches[i][0])))
if ul.len == 0: