summaryrefslogtreecommitdiffstats
path: root/lib/template/blocks.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/template/blocks.js')
-rw-r--r--lib/template/blocks.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/template/blocks.js b/lib/template/blocks.js
new file mode 100644
index 0000000..a079cde
--- /dev/null
+++ b/lib/template/blocks.js
@@ -0,0 +1,16 @@
+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
+ };
+ }
+};