diff options
author | Samy Pessé <samypesse@gmail.com> | 2014-11-03 17:40:38 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2014-11-03 17:40:38 +0100 |
commit | dfd487692a948b9d16f1fbd75b6c4dd65d44c1cb (patch) | |
tree | 5f295d74c8b96b5fd9f595c8f22c143bcee62540 /lib/generate | |
parent | 195374eceeb5812df3c14ee5fdb88ed7f3310a2b (diff) | |
download | gitbook-dfd487692a948b9d16f1fbd75b6c4dd65d44c1cb.zip gitbook-dfd487692a948b9d16f1fbd75b6c4dd65d44c1cb.tar.gz gitbook-dfd487692a948b9d16f1fbd75b6c4dd65d44c1cb.tar.bz2 |
Adapt new page.parse api for tests
Diffstat (limited to 'lib/generate')
-rw-r--r-- | lib/generate/json/index.js | 5 | ||||
-rw-r--r-- | lib/generate/site/index.js | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/lib/generate/json/index.js b/lib/generate/json/index.js index 6bc5211..a252ed3 100644 --- a/lib/generate/json/index.js +++ b/lib/generate/json/index.js @@ -29,8 +29,9 @@ Generator.prototype.convertFile = function(content, input) { dir: path.dirname(input) || '/' }); }) - .then(function(sections) { - json.sections = sections; + .then(function(parsed) { + json.lexed = parsed.lexed; + json.sections = parsed.sections; }) .then(function() { return fs.writeFile( diff --git a/lib/generate/site/index.js b/lib/generate/site/index.js index 47d09f2..f0a4780 100644 --- a/lib/generate/site/index.js +++ b/lib/generate/site/index.js @@ -120,7 +120,7 @@ Generator.prototype.prepareFile = function(content, _input) { .then(function() { // Lex, parse includes and get // Get HTML generated sections - return parse.page(page, { + return parse.page(page.content, { // Local files path dir: path.dirname(_input) || '/', @@ -134,8 +134,9 @@ Generator.prototype.prepareFile = function(content, _input) { ], path.join, fs.readFileSync) }); }) - .then(function(sections) { - page.sections = sections; + .then(function(parsed) { + page.lexed = parsed.lexed; + page.sections = parsed.sections; // Use plugin hook return _callHook("page"); |