summaryrefslogtreecommitdiffstats
path: root/lib/blocks.js
diff options
context:
space:
mode:
authorSamy Pesse <samypesse@gmail.com>2015-09-12 19:25:01 +0200
committerSamy Pesse <samypesse@gmail.com>2015-09-12 19:25:01 +0200
commit601ce3add380392fe9c1d598e01f05034ff058c3 (patch)
tree78bc33c81083ee73fd7c1f2bcbcf42cdc2c05a05 /lib/blocks.js
parent08ff39fd0b95eed935241da96dcd43ef660f8860 (diff)
downloadgitbook-601ce3add380392fe9c1d598e01f05034ff058c3.zip
gitbook-601ce3add380392fe9c1d598e01f05034ff058c3.tar.gz
gitbook-601ce3add380392fe9c1d598e01f05034ff058c3.tar.bz2
Add default blocks (html and code)
Diffstat (limited to 'lib/blocks.js')
-rw-r--r--lib/blocks.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/blocks.js b/lib/blocks.js
new file mode 100644
index 0000000..92097a7
--- /dev/null
+++ b/lib/blocks.js
@@ -0,0 +1,11 @@
+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 extent by plugins
+ code: _.identity
+};