summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-01-21 23:06:11 +0100
committerSamy Pessé <samypesse@gmail.com>2016-12-22 11:46:15 +0100
commit919ff2155cb2b48aaeb3805babeda4aed98cac8b (patch)
tree7bf573183165d7f0dd076235c59ad37263276eed
parent944477f0c3b71d0043bdf3a9ee17514fdf56fc4d (diff)
downloadgitbook-919ff2155cb2b48aaeb3805babeda4aed98cac8b.zip
gitbook-919ff2155cb2b48aaeb3805babeda4aed98cac8b.tar.gz
gitbook-919ff2155cb2b48aaeb3805babeda4aed98cac8b.tar.bz2
Remove levels from chapters list
-rwxr-xr-xpackages/gitbook-asciidoc/lib/summary.js12
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