diff --git a/lib/parse/page.js b/lib/parse/page.js index 8bef30884..559be9116 100644 --- a/lib/parse/page.js +++ b/lib/parse/page.js @@ -39,7 +39,8 @@ function render(section, _options) { function parsePage(src, options) { options = options || {}; - return lex(src) + // Lex if not already lexed + return (_.isArray(src) ? src : lex(src)) .map(function(section) { // Generate a uniqueId to identify this section in our code var id = _.uniqueId('gitbook_');