Skip to content

Commit 73a7f2b

Browse files
committed
Update lunr.js to fix search
1 parent a401a68 commit 73a7f2b

File tree

2 files changed

+3372
-2872
lines changed

2 files changed

+3372
-2872
lines changed

_includes/search.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@
4949
query = "";
5050

5151
for(const term of searchTerms) {
52-
query += ` +${term}`
52+
if (term.length > 0) {
53+
query += "+" + term.trim() + " "
54+
}
5355
}
5456

5557
return query.trim();
@@ -138,4 +140,4 @@
138140
</form>
139141
<div id="lunrsearchresults">
140142
<ul id="search-result" name="search-result" class="search-result"></ul>
141-
</div>
143+
</div>

0 commit comments

Comments
 (0)