mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2025-05-16 08:04:25 -04:00
trim whitespace before searching
This commit is contained in:
parent
346ae95069
commit
624b1d0afb
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ function activeToggle() {
|
|||
sInput.onkeyup = function (e) {
|
||||
// run a search query (for "term") every time a letter is typed
|
||||
// in the search box
|
||||
const results = fuse.search(this.value); // the actual query being run using fuse.js
|
||||
const results = fuse.search(this.value.trim()); // the actual query being run using fuse.js
|
||||
|
||||
if (results.length !== 0) {
|
||||
// build our html if result exists
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue