mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 20:10:03 +00:00
Catch syntax errors in regexp filters
This commit is contained in:
parent
f4005871b4
commit
8d9f1e7477
@ -41,7 +41,11 @@ exports.regexp = function(source,operator,options) {
|
|||||||
regexpString = regexpString.substr(0,regexpString.length - match[0].length);
|
regexpString = regexpString.substr(0,regexpString.length - match[0].length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
regexp = new RegExp(regexpString,flags);
|
try {
|
||||||
|
regexp = new RegExp(regexpString,flags);
|
||||||
|
} catch(e) {
|
||||||
|
return ["" + e];
|
||||||
|
}
|
||||||
// Process the incoming tiddlers
|
// Process the incoming tiddlers
|
||||||
if(operator.prefix === "!") {
|
if(operator.prefix === "!") {
|
||||||
source(function(tiddler,title) {
|
source(function(tiddler,title) {
|
||||||
|
Loading…
Reference in New Issue
Block a user