diff options
Diffstat (limited to 'lib/template')
-rw-r--r-- | lib/template/blocks.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/template/blocks.js b/lib/template/blocks.js index a079cde..5dfb0c8 100644 --- a/lib/template/blocks.js +++ b/lib/template/blocks.js @@ -12,5 +12,25 @@ module.exports = { html: false, body: blk.body }; + }, + + // Render some markdown to HTML + markdown: function(blk) { + return this.book.renderInline('markdown', blk.body) + .then(function(out) { + return { body: out }; + }); + }, + asciidoc: function(blk) { + return this.book.renderInline('asciidoc', blk.body) + .then(function(out) { + return { body: out }; + }); + }, + markup: function(blk) { + return this.book.renderInline(this.ctx.file.type, blk.body) + .then(function(out) { + return { body: out }; + }); } }; |