dz0ny/jade.php — pull request #1 by kieronbrowne (2012-06-01 11:10:24+00:00)
Title: Handle special attributes like selected and checked where inclusion criteria is given in php code

Hi dz0ny

This patch allows markup such as:

option(value=id,selected=sel) foo

to work where $sel is a php expression.

If $sel == true, selected="[val of $sel]" will be dumped, otherwise the attribute will be omitted completely.

This is to avoid the problem where $sel evaluates to false, and you end up with selected="false" or similar in the HTML, which actually sets the element as selected.

Worth including?

Kieron