visionmedia/jade — pull request #609 by chowey (2012-04-26 01:34:01+00:00)
Title: Mixin `attributes`

This is based on discussion in #600.

This allows mixins to work more or less like tags. In fact, we basically recycle all the relevant tag code. This is for DRY reasons and because the wheel was already invented once.

Attributes are available within mixins using the `attributes` keyword. You can do `+foo.bar` for example, and access it with `div(class=attributes.class)`.

There is also a special significance if you do `div(attributes)`. This appends all the called attributes.

This expands on the changes proposed in #608.