creationix/haml-js — pull request #72 by brakhane (2012-09-20 17:35:33+00:00)
Title: Bugfix regaring :else

:else is implemented via "if ! condition", so in the following
expression:

:if 1+1==3
...
:else
...

the else part is compiled into "if ! 1+1 == 3". Since in JavaScript,
the not operator has higher precedence, this is interpreted as
"if (!1)+1 == 3", which is false. Therefore, the above expression
will output nothing unless the condition would have been written as
":if (1+1==3)"

This commit fixes :else and :elseif by always adding parenthesis like
it is done for if.