summaryrefslogtreecommitdiffstats
path: root/lib/parse
diff options
context:
space:
mode:
Diffstat (limited to 'lib/parse')
-rw-r--r--lib/parse/page.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/parse/page.js b/lib/parse/page.js
index 8bef308..559be91 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_');