1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 18:17:20 +00:00

Make the prefix filter operator be case insensitive by default

This commit is contained in:
Jeremy Ruston 2013-06-09 19:23:52 +01:00
parent 28da24f902
commit b3c6b51fc7

View File

@ -19,15 +19,12 @@ exports.prefix = function(source,operator,options) {
var results = []; var results = [];
// Function to check an individual title // Function to check an individual title
function checkTiddler(title) { function checkTiddler(title) {
var tiddler = options.wiki.getTiddler(title); var match = title.substr(0,operator.operand.length).toLowerCase() === operator.operand.toLowerCase();
if(tiddler) { if(operator.prefix === "!") {
var match = tiddler.fields.title.substr(0,operator.operand.length) === operator.operand; match = !match;
if(operator.prefix === "!") { }
match = !match; if(match) {
} results.push(title);
if(match) {
results.push(title);
}
} }
}; };
// Iterate through the source tiddlers // Iterate through the source tiddlers