mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 04:57:07 -04:00
Remove added backticks from regex
This commit is contained in:
parent
010a1d07d9
commit
6ba4da9711
2 changed files with 6 additions and 6 deletions
|
@ -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',
|
||||
|
|
|
@ -1263,12 +1263,12 @@ function boardRemover(userId, doc) {
|
|||
}
|
||||
|
||||
Boards.uniqueTitle = title => {
|
||||
const m = title.match(`/^(?<title>.*?)\s*(\[(?<num>\d+)]\s*$|\s*$)/`);
|
||||
const m = title.match(/^(?<title>.*?)\s*(\[(?<num>\d+)]\s*$|\s*$)/);
|
||||
const base = escapeForRegex(m.groups.title);
|
||||
let num = 0;
|
||||
Boards.find({ title: new RegExp(`^${base}\\s*\\[\\d+]\\s*$`) }).forEach(
|
||||
board => {
|
||||
const m = board.title.match(`/^(?<title>.*?)\s*\[(?<num>\d+)]\s*$/`);
|
||||
const m = board.title.match(/^(?<title>.*?)\s*\[(?<num>\d+)]\s*$/);
|
||||
if (m) {
|
||||
const n = parseInt(m.groups.num, 10);
|
||||
num = num < n ? n : num;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue