#87 - create in a new pane + fixed some settings stuff

This commit is contained in:
Simon Cambier
2022-09-10 23:01:25 +02:00
parent 3a0b3cbc3a
commit beaa8e5656
6 changed files with 52 additions and 29 deletions

View File

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