diff options
Diffstat (limited to 'lib/book.js')
-rw-r--r-- | lib/book.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/book.js b/lib/book.js index 86b1d67..d8c6542 100644 --- a/lib/book.js +++ b/lib/book.js @@ -187,7 +187,10 @@ Book.prototype.parse = function() { that.books.push(langBook); - return langBook.parse(); + return langBook.parse() + .then(function() { + langBook.config.set('output', path.join(that.config.get('output'), lang.id)); + }); }); } @@ -320,10 +323,12 @@ Book.prototype.isInBook = function(filename) { // Return true if file is in the scope of a child book Book.prototype.isInLanguageBook = function(filename) { + var that = this; + return _.some(this.langs.list(), function(lang) { return pathUtil.isInRoot( - this.resolve(lang.id), - this.resolve(filename) + that.resolve(lang.id), + that.resolve(filename) ); }); }; |