visionmedia/jade — Issue #485: Applying id, class and attributes to filters?
Author: Qard
Created: 2012-01-25 04:40:37+00:00
State: open

What do you think of making filters a little more flexible? I think attribute control could be handy.

For example this jade;

:something.someclass#someid(foo='bar')
content

Would go through a filter something like this;

function (str, attrs) {
return '' + str + '';
}

Generating this;

content

The attrs could be an already formed attribute string or perhaps a hash for some helper to serialize.