summaryrefslogtreecommitdiffstats
path: root/lib/template/blocks.js
diff options
context:
space:
mode:
authorSamy Pesse <samypesse@gmail.com>2016-04-30 20:15:08 +0200
committerSamy Pesse <samypesse@gmail.com>2016-04-30 20:15:08 +0200
commit36b49c66c6b75515bc84dd678fd52121a313e8d2 (patch)
treebc7e0f703d4557869943ec7f9495cac7a5027d4f /lib/template/blocks.js
parent87db7cf1d412fa6fbd18e9a7e4f4755f2c0c5547 (diff)
parent80b8e340dadc54377ff40500f86b1de631395806 (diff)
downloadgitbook-36b49c66c6b75515bc84dd678fd52121a313e8d2.zip
gitbook-36b49c66c6b75515bc84dd678fd52121a313e8d2.tar.gz
gitbook-36b49c66c6b75515bc84dd678fd52121a313e8d2.tar.bz2
Merge branch 'fixes'
Diffstat (limited to 'lib/template/blocks.js')
-rw-r--r--lib/template/blocks.js36
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 };
- });
- }
-};