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
|
||||
.slice((this.page - 1) * this.pageSize, this.page * this.pageSize)
|
||||
.map((str: any) => {
|
||||
const unescaped = str.replace(/\\/g, "");
|
||||
return {
|
||||
type: regexEscape(unescaped) === str ? "text" : "regex",
|
||||
value: unescaped,
|
||||
// if escaped version of string, with '\' removed matches string, then consider it
|
||||
// to be matching text, otherwise, regex
|
||||
type: regexEscape(str.replace(/\\/g, "")) === str ? "text" : "regex",
|
||||
value: str,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user