summaryrefslogtreecommitdiffstats
path: root/lib/book.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/book.js')
-rw-r--r--lib/book.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/book.js b/lib/book.js
index 148706c..8c0d39b 100644
--- a/lib/book.js
+++ b/lib/book.js
@@ -199,7 +199,7 @@ Book.prototype.parse = function() {
// Index summary's articles
that.summary.walk(function(article) {
if (!article.hasLocation()) return;
- that.addPage(article.filename);
+ that.addPage(article.path);
});
})
@@ -210,9 +210,9 @@ Book.prototype.parse = function() {
// Mark a filename as being parsable
Book.prototype.addPage = function(filename) {
- filename = pathUtil.normalize(filename);
+ if (this.hasPage(filename)) return this.getPage(filename);
- if (this.pages[filename]) return;
+ filename = pathUtil.normalize(filename);
this.pages[filename] = new Page(this, filename);
return this.pages[filename];
};