diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-01-21 23:06:11 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-12-22 11:46:15 +0100 |
commit | 919ff2155cb2b48aaeb3805babeda4aed98cac8b (patch) | |
tree | 7bf573183165d7f0dd076235c59ad37263276eed | |
parent | 944477f0c3b71d0043bdf3a9ee17514fdf56fc4d (diff) | |
download | gitbook-919ff2155cb2b48aaeb3805babeda4aed98cac8b.zip gitbook-919ff2155cb2b48aaeb3805babeda4aed98cac8b.tar.gz gitbook-919ff2155cb2b48aaeb3805babeda4aed98cac8b.tar.bz2 |
Remove levels from chapters list
-rwxr-xr-x | packages/gitbook-asciidoc/lib/summary.js | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/packages/gitbook-asciidoc/lib/summary.js b/packages/gitbook-asciidoc/lib/summary.js index b4f9780..2fa78ea 100755 --- a/packages/gitbook-asciidoc/lib/summary.js +++ b/packages/gitbook-asciidoc/lib/summary.js @@ -50,23 +50,11 @@ function defaultChapterList(chapterList, entryPoint) { ].concat(chapterList); } -function parseChaptersLevel(chapterList, level, base) { - var i = base || 0; - return _.map(chapterList, function(chapter) { - chapter.level = (level? [level || "", i] : [i]).join("."); - chapter.article = parseChaptersLevel(chapter.articles || [], chapter.level, 1); - - i = i + 1; - return chapter; - }); -}; - function parseSummary(src, entryPoint) { entryPoint = entryPoint || "README.adoc"; var chapters = parseEntries(src); chapters = defaultChapterList(chapters, entryPoint); - chapters = parseChaptersLevel(chapters); return { chapters: chapters |