Add an /else/ and /else-if/ to the conditional #18

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants

lgalfaso commented Jan 8, 2012

Adds an a conditional /else/ and /else-if/ using the pattern {{??}} and {{?? expression}} so it can be used in this way

{{? expression}}
Something
{{?? expression}}
Something else
{{??}}
In case the two other expressions fail
{{?}}

This seems like a great addition

Question, can multiple conditionals be placed before the close, effectively giving you an "if , else if, else, endif" structure if you wanted?

The markup {{??}} still works for /else/

Owner

olado commented Jan 27, 2012

Thanks, looks good, I will test it out later and will merge. I think I need to split doT in 2, one core and one that has advanced features (compile time defines, conditionals, forEach...) so that people who don't care about extra things get smaller size and faster compilation speed.

Another option to having 2 versions of doT is having a way to extend

Owner

olado commented Jan 27, 2012

Exactly.

------Original Message------
From: Lucas Galfasó
To: Laura Doktorova
Subject: Re: [doT] Add an /else/ and /else-if/ to the conditional (#18)
Sent: Jan 27, 2012 1:13 PM

Another option to having 2 versions of doT is having a way to extend


Reply to this email directly or view it on GitHub:
#18 (comment)

Owner

olado commented Apr 21, 2012

Thanks, I added your else-if into 0.1.8

olado closed this Apr 21, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment