This commit is contained in:
Simon Cambier
2022-07-14 20:59:16 +02:00
parent 7083371457
commit 0b47e23408
4 changed files with 38 additions and 19 deletions

View File

@@ -2,6 +2,7 @@ import { Notice, TAbstractFile, TFile } from 'obsidian'
import MiniSearch, { type Options, type SearchResult } from 'minisearch'
import {
chsRegex,
searchIndexFilePath,
SPACE_OR_PUNCTUATION,
type IndexedNote,
type ResultNote,
@@ -33,7 +34,6 @@ import {
let minisearchInstance: MiniSearch<IndexedNote>
let isIndexChanged: boolean
const searchIndexFilePath = `${app.vault.configDir}/plugins/omnisearch/searchIndex.json`
const tokenize = (text: string): string[] => {
const tokens = text.split(SPACE_OR_PUNCTUATION)