From 5c597ca218debbbca46c900bb29a49471911c711 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Mon, 25 Nov 2013 01:14:31 -0500 Subject: [PATCH] expand regex for templates, allowing the syntax to be less strict re: whitespace --- public/src/templates.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/public/src/templates.js b/public/src/templates.js index a5750c0a04..f4df8cd18c 100644 --- a/public/src/templates.js +++ b/public/src/templates.js @@ -235,11 +235,11 @@ } function makeRegex(block) { - return new RegExp("[\\s\\S]*", 'g'); + return new RegExp("[\\s\\S]*", 'g'); } function makeConditionalRegex(block) { - return new RegExp("[\\s\\S]*", 'g'); + return new RegExp("[\\s\\S]*", 'g'); } function getBlock(regex, block, template) { @@ -249,8 +249,8 @@ if (self.blocks && block !== undefined) self.blocks[block] = data[0]; data = data[0] - .replace("", "") - .replace("", ""); + .replace("", "") + .replace("", ""); return data; } @@ -309,7 +309,7 @@ var conditionalBlock = conditional.exec(template); if (conditionalBlock !== null) { - conditionalBlock = conditionalBlock[0].split(''); + conditionalBlock = conditionalBlock[0].split(//); if (conditionalBlock[1]) { // there is an else statement