From b3c6b51fc799bec266300e0dc9fc1e91dda250ac Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sun, 9 Jun 2013 19:23:52 +0100 Subject: [PATCH] Make the prefix filter operator be case insensitive by default --- core/modules/filters/prefix.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/core/modules/filters/prefix.js b/core/modules/filters/prefix.js index 249f6cba9..9ef27bd4b 100644 --- a/core/modules/filters/prefix.js +++ b/core/modules/filters/prefix.js @@ -19,15 +19,12 @@ exports.prefix = function(source,operator,options) { var results = []; // Function to check an individual title function checkTiddler(title) { - var tiddler = options.wiki.getTiddler(title); - if(tiddler) { - var match = tiddler.fields.title.substr(0,operator.operand.length) === operator.operand; - if(operator.prefix === "!") { - match = !match; - } - if(match) { - results.push(title); - } + var match = title.substr(0,operator.operand.length).toLowerCase() === operator.operand.toLowerCase(); + if(operator.prefix === "!") { + match = !match; + } + if(match) { + results.push(title); } }; // Iterate through the source tiddlers