visionmedia/jade — pull request #508 by chrisdavies (2012-02-16 17:19:42+00:00)
Title: Adding the ability to support optional properties.

I love this library.

Right now, the render function stops if a property isn't found (e.g. #{foodoesntexist}). This is by design, I'm sure, but it would be nice to be able to specify a different behavior, so I added a few ways:

#{foodoesntexist|"Hello"} will return hello
${foodoesntexist} will return blank and is the same as writing #{foodoesntexist|}
!{foodoesntexist|"Hi"} will return the bold tag

If the pipe is not specified, then the template behaves as it currently does without my changes.

I didn't know how to run your make file or tests, though. :(

Thanks,
Chris