There might come a time that you would want to alter the contents of a template before compiling or rendering it. This is most commonly required when you would like to remove excessive white space from templates, or if you'd like to remove or replace parts of a template you have no control over.
In this recipe, we'll make use of the
contrib-jade (0.12.0) plugin and the
processContent option provided by its
jade task to remove whitespace from our templates before rendering them to HTML.
In this example, we'll work with the basic project structure we created in the Compiling Jade templates recipe of this chapter. Be sure to refer to it if you are not yet familiar with its contents.