abap_mustache
abap_mustache copied to clipboard
Various New Features
- Support inverted section for list (as per https://mustache.github.io/mustache.5.html "That is, they will be rendered if the key doesn't exist, is false, or is an empty list.") to make this possible:
{{#sizes}}{{size}},{{/sizes}}{{^sizes}}all sold out{{/sizes}} - Support
@firstand@lastlike eg https://github.com/samskivert/jmustache to make this possible:{{#sizes}}{{^@first}}, {{/@first}}{{size}}{{#@last}}.{{/@last}}{{/sizes}} - Render a date, time or timestamp (short or long) variable as either raw, ISO, user or environment formatted (cf. cl_abap_format=>d*, cl_abap_format=>t*, cl_abap_format=>ts*), be able to supply a timezone for timestamp formatting
- Offer formatting options currency,zero,sign and decimals for numeric fields and use raw, user or environment format (cf. cl_abap_format=>n*)
- Offer formatting options width,align, alpha and pad for non-numeric fields
- Formatting options are added with # and = to the variable name, eg
number#decimals=1#sign=RIGHTPLUSorstring#align=CENTER#WIDTH=5#PAD=x
As a followup after #9, could I kindly ask you to add some docs for the content of #9 when you have some time ? The features are cool but not obvious, docs could help