summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2014-05-26 17:21:23 +0200
committerSamy Pessé <samypesse@gmail.com>2014-05-26 17:21:23 +0200
commit45891d80c7f7d0f4ece53dbaf7f9f3717dc58b6f (patch)
treea32181a5bd2b69873f42814c6063d58f35b37e11 /test
parentac900aa37f7b2ea584efb992fe6bcdb69e8b01d6 (diff)
downloadgitbook-45891d80c7f7d0f4ece53dbaf7f9f3717dc58b6f.zip
gitbook-45891d80c7f7d0f4ece53dbaf7f9f3717dc58b6f.tar.gz
gitbook-45891d80c7f7d0f4ece53dbaf7f9f3717dc58b6f.tar.bz2
Parse more than two level in summary
Diffstat (limited to 'test')
-rw-r--r--test/fixtures/SUMMARY.md1
-rw-r--r--test/summary.js1
2 files changed, 2 insertions, 0 deletions
diff --git a/test/fixtures/SUMMARY.md b/test/fixtures/SUMMARY.md
index 74bbd1b..1145025 100644
--- a/test/fixtures/SUMMARY.md
+++ b/test/fixtures/SUMMARY.md
@@ -3,6 +3,7 @@
* [Chapter 1](chapter-1/README.md)
* [Article 1](chapter-1/ARTICLE1.md)
* [Article 2](chapter-1/ARTICLE2.md)
+ * [article 1.2.1](chapter-1/ARTICLE-1-2-1.md)
* [Chapter 2](chapter-2/README.md)
* [Chapter 3](chapter-3/README.md)
* [Chapter 4](chapter-4/README.md)
diff --git a/test/summary.js b/test/summary.js
index 9af1f9f..0316b31 100644
--- a/test/summary.js
+++ b/test/summary.js
@@ -50,5 +50,6 @@ describe('Summary parsing', function () {
assert.equal(c[0].articles[0].level, '1.1');
assert.equal(c[0].articles[1].level, '1.2');
+ assert.equal(c[0].articles[1].articles[0].level, '1.2.1');
});
});