mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-04-25 20:23:21 +00:00
fixed an awful typo in the regexp
The regexp fails when backslashes are used in the search-regexp. The closing bracket was at the wrong position.
This commit is contained in:
parent
14ca91a949
commit
0dc8de9dd2
@ -63,7 +63,7 @@ function parseFilterOperation(operators,filterString,p) {
|
|||||||
nextBracketPos = filterString.indexOf(']',p);
|
nextBracketPos = filterString.indexOf(']',p);
|
||||||
break;
|
break;
|
||||||
case '/': // regexp brackets
|
case '/': // regexp brackets
|
||||||
var rex = /^((?:[^\\\/]*|\\.))*\/(?:\(([mygi]+)\))?/g,
|
var rex = /^((?:[^\\\/]*|\\.)*)\/(?:\(([mygi]+)\))?/g,
|
||||||
rexMatch = rex.exec(filterString.substring(p));
|
rexMatch = rex.exec(filterString.substring(p));
|
||||||
if(rexMatch) {
|
if(rexMatch) {
|
||||||
operator.regexp = new RegExp(rexMatch[1], rexMatch[2]);
|
operator.regexp = new RegExp(rexMatch[1], rexMatch[2]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user