1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-09-29 23:40:45 +00:00

I feel ashamed :( Somehow this slipped me :( Sorry!

This commit is contained in:
Stephan Hradek 2014-01-12 23:37:11 +01:00
parent a3384d101e
commit 9444ef095f

View File

@ -21,12 +21,13 @@ exports.field = function(source,operator,options) {
function checkTiddler(title) {
var tiddler = options.wiki.getTiddler(title);
if(tiddler) {
var match;
var match,
text = tiddler.getFieldString(operator.operator.replace(/:$/, ""));
if(operator.regexp) {
match = !! operator.regexp.exec(tiddler.getFieldString(operator.operator));
match = !! operator.regexp.exec(text);
}
else {
match = tiddler.getFieldString(operator.operator) === operator.operand;
match = text === operator.operand;
}
if(operator.prefix === "!") {
match = !match;