Compiler.php
public function addFilter($name, $callback)
    {

        if (!is_callable($callback))
            throw new \InvalidArgumentException(
                "Argument 2 of addFilter must be valid callback"
            );

        $this->options['filters'][$name] = $callback;

        return $this;
    }
public function addFilter($name, $callback)
    {

        if (!is_callable($callback))
            throw new \InvalidArgumentException(
                "Argument 2 of addFilter must be valid callback"
            );

        $this->options['filters'][$name] = $callback;

        return $this;
    }
public function addFilter ( $ name , $ callback ) { if ( ! is_callable ( $ callback ) ) throw new \ InvalidArgumentException ( "Argument 2 of addFilter must be valid callback" ) ; $ this -> options [ 'filters' ] [ $ name ] = $ callback ; return $ this ; }
Adds a filter to the compiler.

This filter can then be used inside jade with the
:<filtername> directive

The callback should have the following signature:
(\Tale\Jade\Parser\Node $node, $indent, $newLine)
where $node is the filter-Node found,
$indent is the current indentation respecting level and pretty-option
and newLine is a new-line respecting the pretty-option

It should return either a PHTML string or a Node-instance

@param string   $name     the name of the filter
@param callable $callback the filter handler callback

@return $this
Adds a filter to the compiler .