From 2e3221c4e0e8f4b2af5e6be4b9d04569e1bceda1 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Thu, 28 Aug 2014 14:48:03 +0100 Subject: [PATCH] Fix for removesuffic operator --- core/modules/filters/removesuffix.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/filters/removesuffix.js b/core/modules/filters/removesuffix.js index 5f0da8b82..4256fe49f 100644 --- a/core/modules/filters/removesuffix.js +++ b/core/modules/filters/removesuffix.js @@ -19,7 +19,7 @@ exports.removesuffix = function(source,operator,options) { var results = []; source(function(tiddler,title) { if(title.substr(-operator.operand.length).toLowerCase() === operator.operand.toLowerCase()) { - results.push(title.substr(operator.operand.length)); + results.push(title.substr(0,title.length - operator.operand.length)); } }); return results;