From eb2f6aeca891135389e58da0016c60af1363df61 Mon Sep 17 00:00:00 2001
From: chaosarium <38693485+chaosarium@users.noreply.github.com>
Date: Mon, 09 Jan 2023 22:14:11 +0000
Subject: [PATCH] Fix callout behaviour inconsistent with Obsidian (closes #168) (#268)

---
 assets/js/full-text-search.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/assets/js/full-text-search.js b/assets/js/full-text-search.js
index a8f7f23..709a3b3 100644
--- a/assets/js/full-text-search.js
+++ b/assets/js/full-text-search.js
@@ -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