Jade code block
Get Jade code at and inside a given line or query.
doc.jade
doctype htmlhtml head title my jade template body h1 Hello #{name} p foo
Get block at line number
var source = fs; var getCodeBlock = ;getCodeBlock; // head// title my jade template
Get block at string match
Will return a string for a single match, an array of code blocks when multiple matches are found.
var source = fs; var getCodeBlock = ;getCodeBlock; // body// h1 Hello #{name}// p foo
Get block after block at line
var source = fs; var getCodeBlock = ;getCodeBlock; // body// h1 Hello #{name}// p foo
Get block before block at line
var source = fs; var getCodeBlock = ;getCodeBlock; // head// title my jade template