@@ -122,7 +122,7 @@ Team size: 3 developers
122122== math
123123Computes the result of an arithmetic operation.
124124
125- *Syntax*: {{[purple]##math## _operand1_ _'operator'_ _operand2_ {startsb}[purple]##decimals##: _dec_ {startsb}[purple]##locale##: _loc_{endsb}{endsb}}}
125+ *Syntax*: {{[purple]##math## _operand1_ _'operator'_ _operand2_ {startsb}[purple]##decimals##= _dec_ {startsb}[purple]##locale##= _loc_{endsb}{endsb}}}
126126
127127Supported operators: `+`, `-`, `\*`, `/`, `%`, `**`.
128128
@@ -170,7 +170,7 @@ interest: 37,50 EUR
170170== compare
171171Compares two operands using the specified relational operator.
172172
173- *Syntax*: {{[purple]##compare## _operand1_ _'operator'_ _operand2_}}
173+ *Syntax*: {{[purple]##compare## _operand1_ _'operator'_ _operand2_ {startsb}[purple]##asString##=_strBool_{endsb} }}
174174
175175Supported relational operators: `==`, `!=`, `<`, `\<=`, `>`, `>=`.
176176
@@ -199,6 +199,7 @@ Exceeded allowed penalty: false
199199You won!
200200----
201201
202+ If the operands are numeric you can enforce comparing them as strings by specifying `asString=true`.
202203
203204== asBoolean
204205Returns the boolean value of the operand.
@@ -323,7 +324,7 @@ Click here to download the logs.
323324== asJavaId
324325Converts a value to a valid Java identifier.
325326
326- *Syntax*: {{[purple]##asJavaId## _value_ {startsb}[purple]##camelCase##: _ccBool_{endsb} {startsb}[purple]##underscore##: _usBool_{endsb}}}
327+ *Syntax*: {{[purple]##asJavaId## _value_ {startsb}[purple]##camelCase##= _ccBool_{endsb} {startsb}[purple]##underscore##= _usBool_{endsb}}}
327328
328329You can control the format of the generated Java identifier by specifying the values of the boolean flags [purple]##camelCase## and [purple]##underscore##.
329330The default values are: [purple]##camelCase## = true and [purple]##underscore## = false.
@@ -348,6 +349,59 @@ package: byte_as_an_octet
348349----
349350
350351
352+ == asUrlPath
353+ Encodes a string as the path part of a URL.
354+
355+ *Syntax*: {{[purple]##asUrlPath## _value_ {startsb}[purple]##ascii##=_aBool_{endsb}}}
356+
357+ If the [purple]##ascii## flag is `true`, the string will be encoded so that it only contains characters in the US-ASCII charset.
358+ The default value of the [purple]##ascii## flag is `false`.
359+
360+ *Example:*
361+
362+ .YAML Model
363+ ----
364+ name: Mötley Crüe
365+ ----
366+
367+ .Template
368+ ----
369+ Click <a href="http://videos.example.org/{{asUrlPath name}}.mp4">here</a> to download.
370+
371+ Click <a href="http://videos.example.org/{{asUrlPath name ascii=true}}.mp4">here</a> to download.
372+ ----
373+
374+ .Result
375+ ----
376+ Click <a href="http://videos.example.org/Mötley%20Crüe.mp4">here</a> to download.
377+
378+ Click <a href="http://videos.example.org/M%C3%B6tley%20Cr%C3%BCe.mp4">here</a> to download.
379+ ----
380+
381+
382+ == asUrlQuery
383+ Encodes a string as the query part of a URL.
384+
385+ *Syntax*: {{[purple]##asUrlQuery## _value_}}
386+
387+ *Example:*
388+
389+ .YAML Model
390+ ----
391+ url: http://www.example.org/news?id=101
392+ ----
393+
394+ .Template
395+ ----
396+ Click <a href="http://translate.example.org?url={{asUrlQuery url}}">here</a> to translate the page.
397+ ----
398+
399+ .Result
400+ ----
401+ Click <a href="http://translate.example.org?url=http%3A%2F%2Fwww.example.org%2Fnews%3Fid%3D101">here</a> to translate the page.
402+ ----
403+
404+
351405== javaComment
352406Inserts the content of a file as a Java comment.
353407
0 commit comments