Filter out empty sections when generating pages

This commit is contained in:
Aaron O'Mullan
2014-03-31 15:14:31 -07:00
parent a8e0de86e9
commit e9e94a7344
+3
View File
@@ -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_');