summaryrefslogtreecommitdiffstats
path: root/lib/page
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-02-15 14:07:26 +0100
committerSamy Pessé <samypesse@gmail.com>2016-02-15 14:07:26 +0100
commit354fe1274242bef87b739dbe43cdb634ea573662 (patch)
treed4a7c1f48878ba4eb6793535cc42a516a143bc0e /lib/page
parent1b19c6660303cb6ce98ac0ad76580f66b52985f1 (diff)
downloadgitbook-354fe1274242bef87b739dbe43cdb634ea573662.zip
gitbook-354fe1274242bef87b739dbe43cdb634ea573662.tar.gz
gitbook-354fe1274242bef87b739dbe43cdb634ea573662.tar.bz2
Fix addBlock for template engine
Add test for code block
Diffstat (limited to 'lib/page')
-rw-r--r--lib/page/index.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/page/index.js b/lib/page/index.js
index b3ff00f..342830a 100644
--- a/lib/page/index.js
+++ b/lib/page/index.js
@@ -139,7 +139,7 @@ Page.prototype.toHTML = function(output) {
// Render template
.then(function() {
- return output.template.renderString(that.content, that.getContext(), {
+ return output.template.render(that.content, that.getContext(), {
file: that.path
})
.then(that.update);
@@ -154,6 +154,12 @@ Page.prototype.toHTML = function(output) {
});
})
+ // Post process templating
+ .then(function() {
+ return output.template.postProcess(that.content)
+ .then(that.update);
+ })
+
// Normalize HTML output
.then(function() {
var pipelineOpts = {