From ccd2f6ecdc17f796ff434ed89e63df4e3bee8434 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Fri, 23 Jan 2015 12:11:27 +0100 Subject: [PATCH] Check that readme file is not ignored when parsing --- lib/book.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/book.js b/lib/book.js index b3c691584..4a60acf92 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)