summaryrefslogtreecommitdiffstats
path: root/lib/book.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-01-23 12:11:27 +0100
committerSamy Pessé <samypesse@gmail.com>2015-01-23 12:11:27 +0100
commitccd2f6ecdc17f796ff434ed89e63df4e3bee8434 (patch)
treec6c2dd2d1eaec8b6cb883d08522ada3a91878fa7 /lib/book.js
parent19f1d31758727d09a173037583d8ed765d539a33 (diff)
downloadgitbook-ccd2f6ecdc17f796ff434ed89e63df4e3bee8434.zip
gitbook-ccd2f6ecdc17f796ff434ed89e63df4e3bee8434.tar.gz
gitbook-ccd2f6ecdc17f796ff434ed89e63df4e3bee8434.tar.bz2
Check that readme file is not ignored when parsing
Diffstat (limited to 'lib/book.js')
-rw-r--r--lib/book.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/book.js b/lib/book.js
index b3c6915..4a60acf 100644
--- a/lib/book.js
+++ b/lib/book.js
@@ -228,6 +228,7 @@ Book.prototype.parseReadme = function() {
return that.findFile(that.config.getStructure("readme"))
.then(function(readme) {
if (!readme) throw "No README file";
+ if (!_.contains(that.files, readme.path)) throw "README file is ignored";
that.readmeFile = readme.path;
return that.template.renderFile(readme.path)