From 6068c17fd443897e540d69b1786db07a0d64b53b Mon Sep 17 00:00:00 2001 From: Dario Vladovic Date: Wed, 19 Feb 2020 00:53:13 +0100 Subject: [PATCH] Fix mustache support Use `mustache.render()` instead of `mustache.to_html()` that got removed as of `mustache` v4. --- lib/consolidate.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/consolidate.js b/lib/consolidate.js index 0477ea9..355568f 100644 --- a/lib/consolidate.js +++ b/lib/consolidate.js @@ -1104,7 +1104,7 @@ exports.mustache.render = function(str, options, cb) { return promisify(cb, function(cb) { var engine = requires.mustache || (requires.mustache = require('mustache')); try { - cb(null, engine.to_html(str, options, options.partials)); + cb(null, engine.render(str, options, options.partials)); } catch (err) { cb(err); } diff --git a/package.json b/package.json index 86a2d1d..fd9c348 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "marko": "^3.12.0", "mocha": "^3.1.2", "mote": "^0.2.0", - "mustache": "^2.2.1", + "mustache": "^4.0.0", "nunjucks": "^3.0.0", "plates": "~0.4.8", "pug": "^2.0.0-beta6",