You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, a simple separator can be set by the user that will be inserted between all values in an array when populating a template.
So, for example:
TemplateMark: Discount applies to the following items: {{#join items separator=", "}}{{name}} ({{id}}){{/join}}
will accept an array of {{"name": "Pineapple", "id": 111}, {"name": "Strawberries", "id": 222}, {"name": "Pomegranate", "id": 333}}
to give: Discount applies to the following items: Pineapple (111), Strawberries (222), Pomegranate (333)
Each list item is separated by a comma.
Request: There should be support for specifically setting the standard, penultimate and final separators. This is already done in other doc generation tools which use the | symbol is used to indicate the punctuation as "list item | penultimate item | final item"
Example syntax: ;|; and|.
So, the example above with the new functionality would be:
TemplateMark: Discount applies to the following items: {{#join items separator=",|and|. "}}{{name}} ({{id}}){{/join}}.
will accept an array of {{"name": "Pineapple", "id": 111}, {"name": "Strawberries", "id": 222}, {"name": "Pomegranate", "id": 333}}
to give: Discount applies to the following items: Pineapple (111), Strawberries (222) and Pomegranate (333).
The text was updated successfully, but these errors were encountered:
At the moment, a simple separator can be set by the user that will be inserted between all values in an array when populating a template.
So, for example:
Each list item is separated by a comma.
Request: There should be support for specifically setting the standard, penultimate and final separators. This is already done in other doc generation tools which use the | symbol is used to indicate the punctuation as "list item | penultimate item | final item"
Example syntax:
;|; and|.
So, the example above with the new functionality would be:
The text was updated successfully, but these errors were encountered: