summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron O'Mullan <aaron.omullan@friendco.de>2014-10-15 21:28:53 +0200
committerAaron O'Mullan <aaron.omullan@friendco.de>2014-10-15 21:28:53 +0200
commit225ff27dd15b904d6a4a784c219522a28f316a5b (patch)
tree83cf19e47f26fd77072ac63aeaf2152a4b30ffa6
parent52e83618467a238f6b20f5fb77f6f6a2e1450c8c (diff)
downloadgitbook-225ff27dd15b904d6a4a784c219522a28f316a5b.zip
gitbook-225ff27dd15b904d6a4a784c219522a28f316a5b.tar.gz
gitbook-225ff27dd15b904d6a4a784c219522a28f316a5b.tar.bz2
Fix small incompatibility mistake
-rw-r--r--lib/generate/site/index.js11
-rw-r--r--lib/parse/page.js2
2 files changed, 5 insertions, 8 deletions
diff --git a/lib/generate/site/index.js b/lib/generate/site/index.js
index 99f5fb3..4179917 100644
--- a/lib/generate/site/index.js
+++ b/lib/generate/site/index.js
@@ -121,13 +121,10 @@ Generator.prototype.prepareFile = function(content, _input) {
// Lex, parse includes and get
// Get HTML generated sections
return parse.page(page.content, {
- // Directories to search for includes
- dir: [
- // Local files path
- path.dirname(_input) || '/',
- // Project's include folder
- path.join(that.options.input, '_includes'),
- ],
+ // Local files path
+ dir: path.dirname(_input) || '/',
+ // Project's include folder
+ includes_dir: path.join(that.options.input, '_includes'),
// Output directory
outdir: path.dirname(_input) || '/',
// Templating variables
diff --git a/lib/parse/page.js b/lib/parse/page.js
index 846d339..e694f1c 100644
--- a/lib/parse/page.js
+++ b/lib/parse/page.js
@@ -51,7 +51,7 @@ function parsePage(src, options) {
options = options || {};
// Lex if not already lexed
- return (_.isArray(src) ? src : lex(include(src, options.dir, options.variables)))
+ return (_.isArray(src) ? src : lex(include(src, [options.dir, options.includes_dir], options.variables)))
.map(function(section) {
// Transform given type
if(section.type === 'exercise') {