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/site/index.js | |
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/site/index.js')
-rw-r--r-- | lib/generate/site/index.js | 7 |
1 files changed, 4 insertions, 3 deletions
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"); |