The filter can be called inside jade via the :-syntax
The signature of the callback should be
(Node $node, $indent, $newLine)
where $node is the filter node that was encountered (including its children)
and $indent and $newLine are indentation and the new line character
as a string respecting the compiler's 'pretty' option
This is just a proxy for the Compiler's addFilter method