diff --git a/extend/kssIcons.js b/extend/kssIcons.js index 99e839b..896ef1c 100644 --- a/extend/kssIcons.js +++ b/extend/kssIcons.js @@ -44,17 +44,17 @@ module.exports = function(Twig) { }); iconNames.forEach(item => { - var innerContext = {...context}; + var innerContext = Twig.ChildContext(context); innerContext.icon = {}; innerContext.icon.name = item; - output.push(this.parse(token.output, innerContext)); + output.push(Twig.parse.apply(this, [token.output, innerContext])); Twig.merge(context, innerContext, true); }); return { chain: chain, - output: output.join(''), + output: Twig.output.apply(this, [output]), }; }, }); diff --git a/package.json b/package.json index 8aebd64..71ebf7b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@atolye15/kss-node-twig-builder", - "version": "1.3.0", + "version": "1.3.1", "description": "The Twig.js builder for kss-node that used by Atölye15.", "main": "builder.js", "scripts": {