From 77c49a052633e74ff47fb8ca1cf46695fb51e19d Mon Sep 17 00:00:00 2001 From: Moshe Atlow Date: Fri, 3 Jun 2016 04:30:26 +0300 Subject: [PATCH] support layouts in vash --- lib/consolidate.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/consolidate.js b/lib/consolidate.js index 795c2b2..82fa437 100644 --- a/lib/consolidate.js +++ b/lib/consolidate.js @@ -1336,7 +1336,10 @@ exports.vash.render = function(str, options, fn) { } var tmpl = cache(options) || cache(options, engine.compile(str, options)); - fn(null, tmpl(options).replace(/\n$/, '')); + tmpl(options, function sealLayout(err, ctx) { + ctx.finishLayout(); + fn(null, ctx.toString().replace(/\n$/, '')); + }); } catch (err) { fn(err); }