Merge branch 'master' into feature/176-CamelCaseTokens

This commit is contained in:
Simon Cambier
2023-03-02 19:53:05 +01:00
6 changed files with 22 additions and 10 deletions

View File

@@ -190,9 +190,11 @@ export class Omnisearch {
// Filter query results to only keep files that match query.extensions (if any)
if (query.extensions.length) {
results = results.filter(r =>
query.extensions.some(e => r.id.endsWith(e))
)
results = results.filter(r => {
// ".can" should match ".canvas"
const ext = '.' + r.id.split('.').pop()
return query.extensions.some(e => ext.startsWith(e))
})
}
// If the query does not return any result,