fizzed / rocker

Java 8 optimized, memory efficient, speedy template engine producing statically typed, plain java objects
742 stars 90 forks source link

support for switch case ? #181

Open asafbennatan opened 2 weeks ago

asafbennatan commented 2 weeks ago

thanks for the great library , coming from handlebars the type safety is a game changer.

i am missing support for switch case ( i registered such function in handlbars)

so i have something like :

 {{#switch name}}
        {{#case 'John'}}
// continue template for John case
        {{/case}}
        {{#case 'Smith'}}
// continue template for Smith case
        {{/case}}
    {{/switch}}

i might be able to add support for this in a PR if this is desirable

asafbennatan commented 2 weeks ago

an update - i have created a fork for my use case , LMK if you want a PR

asafbennatan commented 2 days ago

PR created #182