velocityjs
Advanced tools
Comparing version 0.3.6 to 0.3.7
{ | ||
"name": "velocityjs", | ||
"description": "Velocity Template Language(VTL) for JavaScript", | ||
"version": "0.3.6", | ||
"version": "0.3.7", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "velocity template" |
@@ -69,5 +69,12 @@ module.exports = function(Velocity, utils){ | ||
asts = asts || this.asts; | ||
if (contextId) { | ||
if (contextId !== this.condition) this.conditions.push(contextId); | ||
if (contextId !== this.condition && | ||
utils.indexOf(contextId, this.conditions) === -1) { | ||
this.conditions.unshift(contextId); | ||
} | ||
this.condition = contextId; | ||
} else { | ||
@@ -74,0 +81,0 @@ this.condition = null; |
@@ -225,2 +225,7 @@ var Velocity = require('../src/velocity'); | ||
it('#foreach with nest foreach', function(){ | ||
var vm = '#foreach($i in [1..2])${velocityCount}#foreach($j in [2..3])${velocityCount}#end#end'; | ||
assert.equal('112212', render(vm)); | ||
}); | ||
it('#foreach with map entrySet', function(){ | ||
@@ -244,2 +249,3 @@ var vm = '' + | ||
'js_alieditControl = /path/build/js/pa/alieditcontrol-update.js?t=20110608'; | ||
var data = { | ||
@@ -246,0 +252,0 @@ staticServer: { |
404877
3435