#58 - index other files than .md

Also, reverted 66e1d2d334 to only make showContext reactive
This commit is contained in:
Simon Cambier
2022-09-23 20:50:55 +02:00
parent 0da61668b0
commit eacb53dc88
9 changed files with 104 additions and 107 deletions

View File

@@ -1,4 +1,3 @@
import { get } from 'svelte/store'
import { settings } from './settings'
import { removeDiacritics, stripSurroundingQuotes } from './utils'
import { parseQuery } from './vendor/parse-query'
@@ -23,7 +22,7 @@ export class Query {
public exclusions: QueryToken[] = []
constructor(text = '') {
if (get(settings).ignoreDiacritics) text = removeDiacritics(text)
if (settings.ignoreDiacritics) text = removeDiacritics(text)
const tokens = parseQuery(text.toLowerCase(), { tokenize: true })
this.exclusions = tokens.exclude.text
.map(this.formatToken)