Option name | Type | Description |
---|---|---|
locals | Object | local variable object |
Compile
function compile(locals) {
return jade.compile(compile.tpl, {
pretty: true
})(locals);
}
Option name | Type | Description |
---|---|---|
block | String |
Jade support for filter :code
jade.filters.code = function( block ) {
return block.replace( /&/g, '&' )
.replace( /</g, '<' )
.replace( />/g, '>' )
.replace( /"/g, '"' )
.replace( /#/g, '#' )
.replace( /\\/g, '\\\\' )
.replace( /\n/g, '\\n' );
};
Template used to produce the documentation
compile.tpl = fs.readFileSync(path.resolve(__dirname, '../views/template.jade')).toString();
module.exports = compile;