From 7a8811a184c8bd6206ee041d6486b7e456d5a84a Mon Sep 17 00:00:00 2001
From: Quadrubo <71718414+Quadrubo@users.noreply.github.com>
Date: Wed, 18 Jan 2023 16:25:01 +0000
Subject: [PATCH] added the liveReloadPort as an option for docker (#272)
---
assets/js/full-text-search.js | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/assets/js/full-text-search.js b/assets/js/full-text-search.js
index 5f56101..709a3b3 100644
--- a/assets/js/full-text-search.js
+++ b/assets/js/full-text-search.js
@@ -1,5 +1,5 @@
; (async function() {
- const encoder = (str) => str.toLowerCase().split(/([^a-z]|[^\x00-\x7F])+/)
+ const encoder = (str) => str.toLowerCase().split(/([^a-z]|[^\x00-\x7F])/)
const contentIndex = new FlexSearch.Document({
cache: true,
charset: "latin:extra",
@@ -35,7 +35,7 @@
})
registerHandlers((e) => {
- term = e.target.value
+ const term = e.target.value
const searchResults = contentIndex.search(term, [
{
field: "content",
@@ -56,6 +56,6 @@
}
const allIds = new Set([...getByField("title"), ...getByField("content")])
const finalResults = [...allIds].map(formatForDisplay)
- displayResults(finalResults, true)
+ displayResults(term, finalResults, true)
})
})()
--
Gitblit v1.10.0