TagSpaces is an offline, open source, document manager with tagging support
fix search query (#1552)
Stanimireaf91dfc5e1a
diff --git a/app/services/electron-io.ts b/app/services/electron-io.tsindex 1fd5baa56..3298dfc88 100644--- a/app/services/electron-io.ts+++ b/app/services/electron-io.ts@@ -408,11 +408,11 @@ export default class ElectronIO {}// Read tsm.json from sub folders- if (!eentry.isFile && mode.includes('extractThumbPath') && !eentry.path.includes(AppConfig.dirSeparator + AppConfig.metaFolder)) {+ if (!eentry.isFile && mode.includes('extractThumbPath') && !eentry.path.includes(PlatformIO.getDirSeparator() + AppConfig.metaFolder)) {const folderMetaPath =eentry.path +AppConfig.dirSeparator +- (!eentry.path.includes(AppConfig.dirSeparator + AppConfig.metaFolder) // TODO this will set parent folder description to /.ts folder too+ (!eentry.path.includes(PlatformIO.getDirSeparator() + AppConfig.metaFolder) // TODO this will set parent folder description to /.ts folder too? AppConfig.metaFolder + AppConfig.dirSeparator: '') +AppConfig.metaFolderFile;diff --git a/app/utils/misc.ts b/app/utils/misc.tsindex 616f55b35..0bee68034 100644--- a/app/utils/misc.ts+++ b/app/utils/misc.ts@@ -109,8 +109,12 @@ export function removeAllTagsFromSearchQuery(query: string) {if (!query) {return '';}- // if (query && query.indexOf('[') > -1) {- return query.replace(/([+-?]\S+)/g, '').trim();+ // return query.replace(/([+-?]\S+)/g, '').trim();+ const queryArray = query.split(' ');+ const returnArray = queryArray.filter(+ q => !q.startsWith('+') && !q.startsWith('-') && !q.startsWith('|')+ );+ return returnArray.join(' ').trim();}export function mergeWithExtractedTags(