mirror of
https://github.com/logseq/logseq.git
synced 2026-05-03 18:36:43 +00:00
fix: use fuse.js for both fuzzy search and full-text search
This commit is contained in:
@@ -204,13 +204,3 @@ export const win32 = path => {
|
||||
// UNC paths are always absolute
|
||||
return Boolean(result[2] || isUnc);
|
||||
};
|
||||
|
||||
export const searchTokenize = str => {
|
||||
let ascii_words = str.split(/\W+/);
|
||||
let non_ascii_str = str.replace(/[\x00-\x7F]/g, '');
|
||||
if (non_ascii_str == '') {
|
||||
return ascii_words;
|
||||
} else {
|
||||
return ascii_words.concat(non_ascii_str.split('')).filter(e => !!e);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user