Skip to content

Commit

Permalink
support layouts in vash
Browse files Browse the repository at this point in the history
  • Loading branch information
MoLow committed Jun 3, 2016
1 parent ebdeda5 commit 77c49a0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/consolidate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 77c49a0

Please sign in to comment.