summaryrefslogtreecommitdiffstats
path: root/lib/models
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-05-04 09:30:09 +0200
committerSamy Pessé <samypesse@gmail.com>2016-05-04 09:30:09 +0200
commit24d38e4fcfbbab2a42f49c6085f30f5d4544b217 (patch)
tree181ca6334323a34706ba69b364d4aebeb2d15a79 /lib/models
parentefb65a8413693b6ca92e0c2aa2d0ddd4129f64f7 (diff)
downloadgitbook-24d38e4fcfbbab2a42f49c6085f30f5d4544b217.zip
gitbook-24d38e4fcfbbab2a42f49c6085f30f5d4544b217.tar.gz
gitbook-24d38e4fcfbbab2a42f49c6085f30f5d4544b217.tar.bz2
Fix #1263: Fix page generation for AsciiDoc
Diffstat (limited to 'lib/models')
-rw-r--r--lib/models/parser.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/models/parser.js b/lib/models/parser.js
index e776582..d28a4e2 100644
--- a/lib/models/parser.js
+++ b/lib/models/parser.js
@@ -43,6 +43,10 @@ Parser.prototype.parseGlossary = function(content) {
Parser.prototype.preparePage = function(content) {
var page = this.get('page');
+ if (!page.prepare) {
+ return Promise(content);
+ }
+
return Promise(page.prepare(content));
};