diff options
Diffstat (limited to 'lib/template/blocks.js')
-rw-r--r-- | lib/template/blocks.js | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/lib/template/blocks.js b/lib/template/blocks.js deleted file mode 100644 index 5dfb0c8..0000000 --- a/lib/template/blocks.js +++ /dev/null @@ -1,36 +0,0 @@ -var _ = require('lodash'); - -module.exports = { - // Return non-parsed html - // since blocks are by default non-parsable, a simple identity method works fine - html: _.identity, - - // Highlight a code block - // This block can be replaced by plugins - code: function(blk) { - return { - 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 }; - }); - } -}; |