From da735227a5447ae8c43545379b16430a2692cfc7 Mon Sep 17 00:00:00 2001 From: Sam J Date: Sat, 26 Jul 2014 19:58:56 +1000 Subject: [PATCH 1/2] Added block overwrite hack --- lib/ect.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ect.js b/lib/ect.js index 37bcd61..2ecfdc2 100644 --- a/lib/ect.js +++ b/lib/ect.js @@ -2,7 +2,7 @@ * ECT CoffeeScript template engine v0.5.9 * https://github.com/baryshev/ect * - * Copyright 2012-2014, Vadim M. Baryshev + * Copyright 2012-2013, Vadim M. Baryshev * Licensed under the MIT license * https://github.com/baryshev/ect/LICENSE * @@ -136,7 +136,7 @@ bufferStack.push('__ectTemplateContext.blocks[\'' + text.replace(/block\s+('|")([^'"]+)('|").*/, '$2') + '\']'); bufferStackPointer++; prefix = '\'\n'; - postfix = '\n' + bufferStack[bufferStackPointer] + ' += \''; + postfix = '\n' + bufferStack[bufferStackPointer] + ' = \''; text = 'if ' + text; buffer += prefix.replace(newlineExp, '\n' + indentation) + text; if (indent) { @@ -302,7 +302,7 @@ TemplateContext.prototype.block = function (name) { if (!this.blocks[name]) { this.blocks[name] = ''; } - return !this.blocks[name].length; + return true || !this.blocks[name].length; }; TemplateContext.prototype.content = function (block) { @@ -692,4 +692,4 @@ }()); } -}()); \ No newline at end of file +}()); From 76be62c74b5615b35f55c30541be2fbe10aa7758 Mon Sep 17 00:00:00 2001 From: Sam J Date: Sat, 26 Jul 2014 20:05:33 +1000 Subject: [PATCH 2/2] Copywrite date --- lib/ect.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ect.js b/lib/ect.js index 2ecfdc2..1042231 100644 --- a/lib/ect.js +++ b/lib/ect.js @@ -2,7 +2,7 @@ * ECT CoffeeScript template engine v0.5.9 * https://github.com/baryshev/ect * - * Copyright 2012-2013, Vadim M. Baryshev + * Copyright 2012-2014, Vadim M. Baryshev * Licensed under the MIT license * https://github.com/baryshev/ect/LICENSE *