mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-02 12:19:11 +00:00
parent
01fa82fac1
commit
8b3bfa6805
@ -17,13 +17,14 @@ Export our filter function
|
||||
*/
|
||||
exports.field = function(source,operator,options) {
|
||||
var results = [],
|
||||
fieldname = (operator.suffix || operator.operator).toLowerCase();
|
||||
fieldname = (operator.suffix || operator.operator).toLowerCase(),
|
||||
isTitle = fieldname === "title";
|
||||
// Function to check an individual title
|
||||
function checkTiddler(title) {
|
||||
var tiddler = options.wiki.getTiddler(title);
|
||||
if(tiddler) {
|
||||
var match,
|
||||
text = tiddler.getFieldString(fieldname);
|
||||
var tiddler = options.wiki.getTiddler(title),
|
||||
text = tiddler ? tiddler.getFieldString(fieldname) : (isTitle ? title : null),
|
||||
match;
|
||||
if(text !== null) {
|
||||
if(operator.regexp) {
|
||||
match = !!operator.regexp.exec(text);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user