From 91e29d7bb21ea00bbd563b2f4edabdc961d3c476 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Wed, 20 Aug 2014 14:08:14 -0400 Subject: [PATCH] updated latest templates.js --- package.json | 2 +- public/src/templates.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index ad5ae44b90..01592c9035 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "validator": "~3.16.1", "winston": "~0.7.2", "xregexp": "~2.0.0", - "templates.js": "0.0.10" + "templates.js": "0.0.13" }, "devDependencies": { "mocha": "~1.13.0" diff --git a/public/src/templates.js b/public/src/templates.js index fc81b14e29..b629b03d0b 100644 --- a/public/src/templates.js +++ b/public/src/templates.js @@ -95,7 +95,7 @@ Please use the npm module instead - require('templates.js') } function makeStatementRegex(key) { - return new RegExp('([\\s]*)|([\\s]*)', 'g'); + return new RegExp('()|()', 'g'); } function registerGlobals(obj) { @@ -114,8 +114,8 @@ Please use the npm module instead - require('templates.js') if (matches !== null) { for (var i = 0, ii = matches.length; i < ii; i++) { var statement = makeStatementRegex(key), - nestedConditionals = matches[i].match(/(?!^)(?!$)/), - match = matches[i].replace(statement, '').replace(/(?!^)/gi, ''), + nestedConditionals = matches[i].match(/(?!^)(?!$)/gi), + match = matches[i].replace(statement, '').replace(/(?!^)(?!$)/gi, ''), conditionalBlock = match.split(/[\r\n?\n]*?[\r\n?\n]*?/); if (conditionalBlock[1]) {