Repository: incubator-freemarker Updated Branches: refs/heads/2.3-gae e726cd243 -> 1cb67f87c
Manual: Documented comment usage inside expressions Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/1cb67f87 Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/1cb67f87 Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/1cb67f87 Branch: refs/heads/2.3-gae Commit: 1cb67f87c3f1fc4337d8a2b8cf4499c1ac177d2e Parents: e726cd2 Author: ddekany <[email protected]> Authored: Sat Oct 14 22:21:28 2017 +0200 Committer: ddekany <[email protected]> Committed: Sat Oct 14 22:21:28 2017 +0200 ---------------------------------------------------------------------- src/manual/en_US/book.xml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/1cb67f87/src/manual/en_US/book.xml ---------------------------------------------------------------------- diff --git a/src/manual/en_US/book.xml b/src/manual/en_US/book.xml index 1e0e4d9..3d74ed3 100644 --- a/src/manual/en_US/book.xml +++ b/src/manual/en_US/book.xml @@ -4035,6 +4035,27 @@ ${("green " + "mouse")?upper_case} <#-- GREEN MOUSE --> }</programlisting> </section> + <section xml:id="dgui_template_exp_comment"> + <title>Comments in expressions</title> + + <para>Expression may contain comments anywhere where they can + contain ignored white-space (<link + linkend="dgui_template_exp_whitespace">see above</link>). Comments + look like <literal><#-- ... --></literal> or as <literal>[#-- + ... --]</literal>. Example:</para> + + <programlisting role="template"><#assign x <#-- A comment --> = 123 <#-- A comment -->> +<#function f(x <#-- A comment -->, y <#-- A comment -->)> + <#return <#-- A comment --> 1 <#-- A comment -->> +</#function> +<#assign someHash = { + "foo": 123, <#-- A comment --> + "bar": x <#-- A comment --> + 1, + <#-- A comment --> + "baaz": f(1 <#-- A comment -->, 2 <#-- A comment -->) +} <#-- A comment -->></programlisting> + </section> + <section xml:id="dgui_template_exp_precedence"> <title>Operator precedence</title>
