diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-05-02 15:57:57 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-12-22 12:32:17 +0100 |
commit | 9e88003d7373e2e7efac862494a9a0db4847f617 (patch) | |
tree | 0757843cf9231e8d23d264a2bc8b8e840ff59805 | |
parent | eb40ad369b2e9214b7484157b748113a08d2f376 (diff) | |
download | gitbook-9e88003d7373e2e7efac862494a9a0db4847f617.zip gitbook-9e88003d7373e2e7efac862494a9a0db4847f617.tar.gz gitbook-9e88003d7373e2e7efac862494a9a0db4847f617.tar.bz2 |
Use 'ref" instead of "path" for summary
-rwxr-xr-x | packages/gitbook-html/lib/summary.js | 2 | ||||
-rw-r--r-- | packages/gitbook-html/lib/totext.js | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/packages/gitbook-html/lib/summary.js b/packages/gitbook-html/lib/summary.js index 132dfdd..8d716d6 100755 --- a/packages/gitbook-html/lib/summary.js +++ b/packages/gitbook-html/lib/summary.js @@ -30,7 +30,7 @@ function parseList($ul, $) { var $a = $li.find(SELECTOR_LINK); if ($a.length > 0) { article.title = $a.first().text(); - article.path = $a.attr('href').replace(/\\/g, '/').replace(/^\/+/, '') + article.ref = $a.attr('href').replace(/\\/g, '/').replace(/^\/+/, '') } // Sub articles diff --git a/packages/gitbook-html/lib/totext.js b/packages/gitbook-html/lib/totext.js index b1c94d4..49762d9 100644 --- a/packages/gitbook-html/lib/totext.js +++ b/packages/gitbook-html/lib/totext.js @@ -95,9 +95,9 @@ ToText.prototype._summaryArticle = function(article, level) { content += this.onListItemStart(level); - if (article.path) content += this.onLinkStart(article.path) + if (article.ref) content += this.onLinkStart(article.ref) content += this.onText(article.title) - if (article.path) content += this.onLinkEnd(article.path); + if (article.ref) content += this.onLinkEnd(article.ref); content += this.onBL(); if (article.articles && article.articles.length > 0) { |