title: How to render a block in custom jade filter?
body: <p>I have two jade templates:</p>
  
  <pre><code># base_template
  block do_something
      :custom_filter
          block do_something_main
  </code></pre>
  
  <p>and</p>
  
  <pre><code>extends base_template
  
  block do_something_main
      h1 Hello There!
  </code></pre>
  
  <p>I have defined the custom filter as follows:</p>
  
  <pre><code>var jade = require("jade");
  jade.filters.custom_filter = function(html, options) {
      var output = jade.render(html, {filename: options.filename});
      // modify the output
      return "&lt;h1&gt;AWESOME RACCOONS!&lt;/h1&gt;" + output;
  }
  </code></pre>
  
  <p>However, the call to <code>jade.render(...)</code> fails to render the <code>do_something_main</code> block. Everything works fine if I do not define another block inside my custom filter.</p>
  
  <p>Eg, making the base_template not define the do_something_main block will render content correctly, but it's not the behavior nor inheritance pattern that I want:</p>
  
  <pre><code># base_template
  block do_something
      :custom_filter
          .awesome_class HELLO THERE
  </code></pre>
  
  <p>How do I get <code>jade.render(...)</code> to render a block inside a custom filter?</p>