diff --git a/lib/parse/page.js b/lib/parse/page.js index 6481e656e..515f4bb3f 100644 --- a/lib/parse/page.js +++ b/lib/parse/page.js @@ -55,6 +55,9 @@ function parsePage(src) { section.type = sectionType(section, idx); return section; }) + .filter(function(section) { + return !_.isEmpty(section); + }) .map(function(section) { // Generate a uniqueId to identify this section in our code var id = _.uniqueId('gitbook_');