瀏覽代碼

Try to fix quotes in Global Search.

Thanks to xet7 !

Related https://github.com/wekan/wekan/pull/3492
Lauri Ojansivu 4 年之前
父節點
當前提交
0ff215f78f
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      client/components/main/globalSearch.js

+ 4 - 4
client/components/main/globalSearch.js

@@ -190,10 +190,10 @@ BlazeComponent.extendComponent({
 
     this.searching.set(true);
 
-    const reOperator1 = /^((?<operator>[\p{Letter}\p{Mark}]+):|(?<abbrev>[#@]))(?<value>[\p{Letter}\p{Mark}]+)(\s+|$)/iu;
-    const reOperator2 = /^((?<operator>[\p{Letter}\p{Mark}]+):|(?<abbrev>[#@]))(?<quote>["']*)(?<value>.*?)\k<quote>(\s+|$)/iu;
-    const reText = /^(?<text>\S+)(\s+|$)/u;
-    const reQuotedText = /^(?<quote>["'])(?<text>[\w\p{L}]+)\k<quote>(\s+|$)/u;
+    const reOperator1 = `/^((?<operator>[\p{Letter}\p{Mark}]+):|(?<abbrev>[#@]))(?<value>[\p{Letter}\p{Mark}]+)(\s+|$)/iu`;
+    const reOperator2 = `/^((?<operator>[\p{Letter}\p{Mark}]+):|(?<abbrev>[#@]))(?<quote>["']*)(?<value>.*?)\k<quote>(\s+|$)/iu`;
+    const reText = `/^(?<text>\S+)(\s+|$)/u`;
+    const reQuotedText = `/^(?<quote>["'])(?<text>[\w\p{L}]+)\k<quote>(\s+|$)/u`;
 
     const operators = {
       'operator-board': 'boards',