You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The JSDoc for this.render suggests that we can pass additional options for Handlebars as the third argument after template name and locals.
However, Handlebars requires that these options be passed to the handlebars.compile function as a second argument. Instead they're being passed into the resulting render function where they're being silently ignored.
This means something like this.render('my-template', {foo: 'bar'}, {preventIndent: true}) won't work as expected.
The text was updated successfully, but these errors were encountered:
HowlingEverett
added a commit
to HowlingEverett/koa-handlebars
that referenced
this issue
Oct 8, 2015
The quickest/dirtiest way of fixing dominicbarnes#22 is to hold those options passed
on this.render on the instance, then use them when `handlebars.compile`
is calling `compileTemplate`.
Oh, I don't think I ever accounted for compile options before. The options there are passed directly during render, which is described here. (so it supports data, helpers, partials)
I'm open to a way to add compile options though, although it's an additional feature instead of a bug fix at this point. :)
The JSDoc for
this.render
suggests that we can pass additional options for Handlebars as the third argument after template name and locals.However, Handlebars requires that these options be passed to the
handlebars.compile
function as a second argument. Instead they're being passed into the resulting render function where they're being silently ignored.This means something like
this.render('my-template', {foo: 'bar'}, {preventIndent: true})
won't work as expected.The text was updated successfully, but these errors were encountered: