diff options
author | Aaron O'Mullan <aaron.omullan@friendco.de> | 2014-03-31 15:14:31 -0700 |
---|---|---|
committer | Aaron O'Mullan <aaron.omullan@friendco.de> | 2014-03-31 15:14:31 -0700 |
commit | e9e94a7344bf25b4c2aa6eb9cb2ce5d93dda583b (patch) | |
tree | f5638ad77a3493e1cda543da61a26ba1887a8cd0 /lib/parse/page.js | |
parent | a8e0de86e94686757f809d1e987e2e025ab8d35d (diff) | |
download | gitbook-e9e94a7344bf25b4c2aa6eb9cb2ce5d93dda583b.zip gitbook-e9e94a7344bf25b4c2aa6eb9cb2ce5d93dda583b.tar.gz gitbook-e9e94a7344bf25b4c2aa6eb9cb2ce5d93dda583b.tar.bz2 |
Filter out empty sections when generating pages
Diffstat (limited to 'lib/parse/page.js')
-rw-r--r-- | lib/parse/page.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/parse/page.js b/lib/parse/page.js index 6481e65..515f4bb 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_'); |