Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Fen1kz/consolidate.js int…
Browse files Browse the repository at this point in the history
…o Fen1kz-master
  • Loading branch information
doowb committed Sep 18, 2017
2 parents 9e096bf + bf64aa7 commit f6b3b0e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

* add plates support
* add teacup support
* allow absolute and relative partial paths
* extend dot options

0.14.0 / 2016-01-24
===================
Expand Down
6 changes: 5 additions & 1 deletion lib/consolidate.js
Original file line number Diff line number Diff line change
Expand Up @@ -1041,8 +1041,12 @@ exports.dot = fromStringRenderer('dot');
exports.dot.render = function (str, options, fn) {
return promisify(fn, function (fn) {
var engine = requires.dot || (requires.dot = require('dot'));
var extend = (requires.extend || (requires.extend = require('util')._extend));
try {
var tmpl = cache(options) || cache(options, engine.compile(str, options && options._def));
var settings = {};
settings = extend(settings, engine.templateSettings);
settings = extend(settings, options ? options.dot : {});
var tmpl = cache(options) || cache(options, engine.template(str, settings, options));
fn(null, tmpl(options));
} catch (err) {
fn(err);
Expand Down

0 comments on commit f6b3b0e

Please sign in to comment.