summaryrefslogtreecommitdiffstats
path: root/lib/book.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-03-08 22:52:54 +0100
committerSamy Pessé <samypesse@gmail.com>2015-03-08 22:53:18 +0100
commitee3a0ba8016f33ed04b2016d72eba1bc36c24146 (patch)
tree8c806e2d02f791f5ba704e735cf609b1c4c8fb20 /lib/book.js
parent7a4179a2a207cecc0b2e4bbdfeb3d0929b85a4c8 (diff)
downloadgitbook-ee3a0ba8016f33ed04b2016d72eba1bc36c24146.zip
gitbook-ee3a0ba8016f33ed04b2016d72eba1bc36c24146.tar.gz
gitbook-ee3a0ba8016f33ed04b2016d72eba1bc36c24146.tar.bz2
Fix #633: update markdown parser to fix codeblocks
Sort glossary and fix #634
Diffstat (limited to 'lib/book.js')
-rw-r--r--lib/book.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/book.js b/lib/book.js
index 38448dd..aee425c 100644
--- a/lib/book.js
+++ b/lib/book.js
@@ -507,13 +507,20 @@ Book.prototype.parsePage = function(filename, options) {
return interpolate(options.interpolateTemplate);
})
+ // Prepare page markup
+ .then(function() {
+ return filetype.page.prepare(page.content)
+ .then(function(content) {
+ page.content = content;
+ });
+ })
+
// Generate template
.then(function() {
return that.template.renderPage(page);
})
// Prepare and Parse markup
- .then(filetype.page.prepare)
.then(function(content) {
page.content = content;