More handlebar helper bugs

This commit is contained in:
Jocelyn Badgley (Twipped) 2020-03-05 19:40:18 -08:00
parent 38f0b38f9f
commit e6f12453b8

View File

@ -196,7 +196,7 @@ class Injectables {
let contents;
if (fn) {
contents = stripIndent(fn(data));
contents = stripIndent(fn(data.root));
} else {
let tpath = args.shift();
tpath = self._parsePath(tpath, data.root.local, 'md');
@ -215,7 +215,7 @@ class Injectables {
return function (tpath, ...args) {
const { hash, data } = args.pop();
const value = args.shift();
const context = handlebars.createFrame(value || data);
const context = handlebars.createFrame(value || data.root);
Object.assign(context, hash || {});
tpath = self._parsePath(tpath, data.root.local, 'hbs');