exclusion regex: show unmodified regex string, avoid dropping the '\' when displaying escaped regexes (#1094)
This commit is contained in:
parent
4948e53cdb
commit
223571b18b
@ -112,10 +112,11 @@ export class QueueExclusionTable extends LiteElement {
|
|||||||
this.results = this.exclusions
|
this.results = this.exclusions
|
||||||
.slice((this.page - 1) * this.pageSize, this.page * this.pageSize)
|
.slice((this.page - 1) * this.pageSize, this.page * this.pageSize)
|
||||||
.map((str: any) => {
|
.map((str: any) => {
|
||||||
const unescaped = str.replace(/\\/g, "");
|
|
||||||
return {
|
return {
|
||||||
type: regexEscape(unescaped) === str ? "text" : "regex",
|
// if escaped version of string, with '\' removed matches string, then consider it
|
||||||
value: unescaped,
|
// to be matching text, otherwise, regex
|
||||||
|
type: regexEscape(str.replace(/\\/g, "")) === str ? "text" : "regex",
|
||||||
|
value: str,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user