diff options
author | Aaron O'Mullan <aaron.omullan@gmail.com> | 2014-07-31 08:43:57 -0700 |
---|---|---|
committer | Aaron O'Mullan <aaron.omullan@gmail.com> | 2014-07-31 08:43:57 -0700 |
commit | ad7927242d9d0fc4ea17c37097c994bd88e3e3e3 (patch) | |
tree | 5bbf88da310cc1036330785f56795693fd01ad87 /lib/parse | |
parent | 5692bdd229020f5b01ca9b24658d6a7b253b6515 (diff) | |
download | gitbook-ad7927242d9d0fc4ea17c37097c994bd88e3e3e3.zip gitbook-ad7927242d9d0fc4ea17c37097c994bd88e3e3e3.tar.gz gitbook-ad7927242d9d0fc4ea17c37097c994bd88e3e3e3.tar.bz2 |
Add comments to default introduction chapter code
Fixes #388
Diffstat (limited to 'lib/parse')
-rw-r--r-- | lib/parse/summary.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/parse/summary.js b/lib/parse/summary.js index 7a65532..21eadd1 100644 --- a/lib/parse/summary.js +++ b/lib/parse/summary.js @@ -102,6 +102,7 @@ function parseChapter(nodes, nums) { function defaultChapterList(chapterList) { var first = _.first(chapterList); + // Check if introduction node was specified in SUMMARY.md if (first) { var chapter = parseChapter(first, [0]); @@ -111,6 +112,7 @@ function defaultChapterList(chapterList) { } } + // It wasn't specified, so add in default return [ [ { type: 'text', text: '[Introduction](README.md)' } ] ].concat(chapterList); |