-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I add options for handlebars compiler? #73
Comments
please test branch issue-73, see test/issues.js |
great work! it works fine. |
Hey, I tried to implement this new compiler option in Ghost, by upgrading express-hbs, and adding the onCompile function here: https://github.com/TryGhost/Ghost/blob/master/core/server/middleware/index.js#L55 However, the option is going missing somewhere. I'm trying to trace it through and I can't figure out what's going wrong. In compiler.js, the option is present in |
I'm not seeing onCompile overridden there. Is it on a different branch? |
@mgutz Sorry, it's here: ErisDS/Ghost@cf9eb5b It's identical to the example code and the express-hbs test for the functionality works for me just fine. Very odd. |
I got this figured out :) The example of
However, the Therefore the following works as expected:
|
That makes sense. I was showing how to filter using the filename. I apologize for the side effects of passing that filename though. Caused at least two issues for you. |
No problem, I'm enjoying getting more familiar with the |
handlebars will auto-indent partials. It becomes undesirable in
<pre>
andmarkdown
. See this issue:handlebars-lang/handlebars.js#858
handlebars compiler added preventIndent option, see:
handlebars-lang/handlebars.js@632fadc
I'll appreciate it if you can provide someway to add this compiler option, thanks.
The text was updated successfully, but these errors were encountered: