promised-handlebars
promised-handlebars copied to clipboard
Wrapper for Handlebars that allows helpers returning promises
travis-ci does not seem to work anymore. If anybody is willing to migrate to Github-Actions, I will merge it. I can live without "coveralls" integration.
In case of any error (either from handlebars or from any helper) the promise just hangs and never resolves or rejects. The easiest way to reproduce this is using a...
Encountered these logs. Unable to find the root cause. ```py TypeError: Cannot read property 'toHTML' of undefined at replacePlaceholdersRecursivelyIn (.../node_modules/promised-handlebars/lib/markers.js:96:31) at .../node_modules/promised-handlebars/lib/markers.js:106:22 at .../node_modules/promised-handlebars/lib/replaceP.js:44:47 at String.replace () at replaceP (.../node_modules/promised-handlebars/lib/replaceP.js:37:14)...
In the following example, `options.fn()` returns a promise instead of a string. ``` js var promisedHandlebars = require('../') var Q = require('q') var Handlebars = promisedHandlebars(require('handlebars')) // Register a helper...
Since version 4.0.0, Handlebars support [decorators](https://github.com/wycats/handlebars.js/blob/master/docs/decorators-api.md). I'm not sure if this needs to be supported by promised-handlebars, but it looks like it should. This should be investigated further.
If a promise fails & returns a null value, fail with some additional info