summaryrefslogtreecommitdiffstats
path: root/lib/models
diff options
context:
space:
mode:
Diffstat (limited to 'lib/models')
-rw-r--r--lib/models/templateBlock.js11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/models/templateBlock.js b/lib/models/templateBlock.js
index 200e048..2f7e19a 100644
--- a/lib/models/templateBlock.js
+++ b/lib/models/templateBlock.js
@@ -23,18 +23,12 @@ var TemplateBlock = Immutable.Record({
// List of shortcuts to replace with this block
shortcuts: Immutable.Map(),
-
- parse: true
}, 'TemplateBlock');
TemplateBlock.prototype.getName = function() {
return this.get('name');
};
-TemplateBlock.prototype.getParse = function() {
- return this.get('parse');
-};
-
TemplateBlock.prototype.getEndTag = function() {
return this.get('end') || ('end' + this.getName());
};
@@ -241,9 +235,8 @@ TemplateBlock.prototype.normalizeBlockResult = function(result) {
@return {String}
*/
TemplateBlock.prototype.blockResultToHtml = function(result, blocksOutput) {
- var parse = this.getParse();
var indexedKey;
- var toIndex = (!parse) || (result.post !== undefined);
+ var toIndex = (!result.parse) || (result.post !== undefined);
if (toIndex) {
indexedKey = genKey();
@@ -251,7 +244,7 @@ TemplateBlock.prototype.blockResultToHtml = function(result, blocksOutput) {
}
// Parsable block, just return it
- if (parse) {
+ if (result.parse) {
return result.body;
}