Fixed search transform removing numbers from query

This commit is contained in:
squidfunk
2020-06-23 08:45:49 +02:00
parent 792494f4cf
commit a3c03aefb9
5 changed files with 7 additions and 7 deletions

View File

@@ -49,7 +49,7 @@ export type SearchTransformFn = (value: string) => string
*/
export function defaultTransform(value: string): string {
return value
.replace(/(?:^|\s+)[*+-:^~]+(?=\s+|$)/g, "")
.replace(/(?:^|\s+)[*+\-:^~]+(?=\s+|$)/g, "")
.trim()
.replace(/\s+|(?![^\x00-\x7F]|^)$|\b$/g, "* ")
}