Jacky Zhao
2022-12-04 ce5df837f5f6ed57f9e9f85439ee9a40ebf234dc
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",
@@ -56,6 +56,6 @@
    }
    const allIds = new Set([...getByField("title"), ...getByField("content")])
    const finalResults = [...allIds].map(formatForDisplay)
    displayResults(finalResults, true)
    displayResults(term, finalResults, true)
  })
})()