diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-01-23 12:11:27 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-01-23 12:11:27 +0100 |
commit | ccd2f6ecdc17f796ff434ed89e63df4e3bee8434 (patch) | |
tree | c6c2dd2d1eaec8b6cb883d08522ada3a91878fa7 /lib | |
parent | 19f1d31758727d09a173037583d8ed765d539a33 (diff) | |
download | gitbook-ccd2f6ecdc17f796ff434ed89e63df4e3bee8434.zip gitbook-ccd2f6ecdc17f796ff434ed89e63df4e3bee8434.tar.gz gitbook-ccd2f6ecdc17f796ff434ed89e63df4e3bee8434.tar.bz2 |
Check that readme file is not ignored when parsing
Diffstat (limited to 'lib')
-rw-r--r-- | lib/book.js | 1 |
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) |