summaryrefslogtreecommitdiffstats
path: root/lib/page/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/page/index.js')
-rw-r--r--lib/page/index.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/page/index.js b/lib/page/index.js
index 77b9950..2a4553f 100644
--- a/lib/page/index.js
+++ b/lib/page/index.js
@@ -144,7 +144,17 @@ Page.prototype.parse = function(output) {
var pipelineOpts = {
onRelativeLink: _.partial(output.onRelativeLink, that),
onImage: _.partial(output.onOutputImage, that),
- onOutputSVG: _.partial(output.onOutputSVG, that)
+ onOutputSVG: _.partial(output.onOutputSVG, that),
+
+ // Use 'code' template block
+ onCodeBlock: function(source, lang) {
+ return output.template.applyBlock('code', {
+ body: source,
+ kwargs: {
+ language: lang
+ }
+ });
+ }
};
var pipeline = new HTMLPipeline(that.content, pipelineOpts);