Refactoring Document storage #5

Merged
leo merged 7 commits from doc-class into main 2023-11-13 17:52:58 +00:00
Showing only changes of commit d4e91ea9a6 - Show all commits

View File

@ -86,7 +86,7 @@ export function haystackFormat(str: string) {
// Preformat search string for faster search
export function needleFormat(query: string) {
const based = query.normalize('NFKD').replace(/[\u0300-\u036f]/g, '').toLowerCase()
return {based, words: based.split(/\W+/)}
return {based, words: based.split(/\s+/)}
}
// Test if haystack includes needle