Skip to content

Commit

Permalink
Document "preventIndent" option
Browse files Browse the repository at this point in the history
I found out about the "preventIndent" option via issue #858, but it would have saved me some time if it would have been documented. So here is a proposal for documentation. I hope I got the markup right.
  • Loading branch information
nknapp committed Mar 9, 2015
1 parent c3898be commit 2d1c047
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/pages/reference.haml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@
<code>strict</code>: Run in strict mode. In this mode, templates will throw rather than silently ignore missing fields. This has the side effect of disabling inverse operatins such as <code>{{^foo}}{{/foo}}</code> unless fields are explicitly included in the source object.
%li
<code>assumeObjects</code>: Removes object existence checks when traversing paths. This is a subset of <code>strict</code> mode that generates optimized templates when the data inputs are known to be safe.
%li
<code>preventIndent</code>: By default an indented partial-call causes the output of the
whole partial being indented by the same amount. This leads to unexpected behavior when the
partial writes <code>pre</code>-tags.
Setting this option to <code>true</code> will disable the auto-indent feature.

%h3#base-precompile
%code Handlebars.precompile(template, options)
Expand Down

0 comments on commit 2d1c047

Please sign in to comment.