summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/models/summaryArticle.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/models/summaryArticle.js b/lib/models/summaryArticle.js
index da82790..08baac3 100644
--- a/lib/models/summaryArticle.js
+++ b/lib/models/summaryArticle.js
@@ -30,12 +30,13 @@ SummaryArticle.prototype.getArticles = function() {
};
/**
- Return how deep the article is
+ Return how deep the article is.
+ The README has a depth of 1
@return {Number}
*/
SummaryArticle.prototype.getDepth = function() {
- return this.getLevel().split('.').length;
+ return (this.getLevel().split('.').length - 1);
};
/**