Refactoring Document storage (#5)
- Major refactoring that makes Doc a class with properties - Data made only shallow reactive, for a good speedup of initial load - Minor bugfixes and UX improvements along the way - Fixed handling of hash and question marks in URLs (was confusing Vue Router) - Search made stricter to find good results (not ignore all punctuation) Reviewed-on: #5
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user