templates
Advanced tools
Comparing version 0.15.9 to 0.15.10
@@ -199,2 +199,3 @@ 'use strict'; | ||
delete engine.options.name; | ||
ext = engine.options.ext; | ||
@@ -217,9 +218,9 @@ // get engine options (settings) | ||
var content = view.content; | ||
if (view.engineStack.hasOwnProperty(ext)) { | ||
view.fn = view.engineStack[ext]; | ||
} else { | ||
// compile the string | ||
view.fn = engine.compile(view.content, mergedSettings); | ||
utils.engineStack(view, ext, view.fn); | ||
content = view.engineStack[ext].content; | ||
} | ||
// compile the string | ||
view.fn = engine.compile(content, mergedSettings); | ||
utils.engineStack(view, ext, view.fn, content); | ||
@@ -226,0 +227,0 @@ // handle `postCompile` middleware |
@@ -47,3 +47,3 @@ 'use strict'; | ||
utils.engineStack = function(view, engine, fn) { | ||
utils.engineStack = function(view, engine, fn, content) { | ||
if (typeof view.engineStack === 'undefined') { | ||
@@ -56,2 +56,3 @@ view.engineStack = {}; | ||
view.engineStack[engine] = fn; | ||
view.engineStack[engine].content = content; | ||
}; | ||
@@ -58,0 +59,0 @@ |
{ | ||
"name": "templates", | ||
"description": "System for creating and managing template collections, and rendering templates with any node.js template engine. Can be used as the basis for creating a static site generator or blog framework.", | ||
"version": "0.15.9", | ||
"version": "0.15.10", | ||
"homepage": "https://github.com/jonschlinkert/templates", | ||
@@ -6,0 +6,0 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
171813
4130