From 2d1c0477fb7dc56655d31d26363872ceb8bf8069 Mon Sep 17 00:00:00 2001 From: Nils Knappmeier Date: Mon, 9 Mar 2015 09:08:07 +0100 Subject: [PATCH] Document "preventIndent" option 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. --- src/pages/reference.haml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pages/reference.haml b/src/pages/reference.haml index de09c41..fd7d069 100644 --- a/src/pages/reference.haml +++ b/src/pages/reference.haml @@ -41,6 +41,11 @@ strict: 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 {{^foo}}{{/foo}} unless fields are explicitly included in the source object. %li assumeObjects: Removes object existence checks when traversing paths. This is a subset of strict mode that generates optimized templates when the data inputs are known to be safe. + %li + preventIndent: 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 pre-tags. + Setting this option to true will disable the auto-indent feature. %h3#base-precompile %code Handlebars.precompile(template, options)