summaryrefslogtreecommitdiffstats
path: root/lib/page
diff options
context:
space:
mode:
authorSamy Pesse <samypesse@gmail.com>2016-02-12 20:48:51 +0100
committerSamy Pesse <samypesse@gmail.com>2016-02-12 20:48:51 +0100
commit82f94b010f1d77957c9d1b0967dcdd5eafe73c39 (patch)
treec13607b4bbdf20eb589052dc785edb6e70d6e031 /lib/page
parent4555c541a8f98cb6ad4cbec2d7bf85b375dbf505 (diff)
downloadgitbook-82f94b010f1d77957c9d1b0967dcdd5eafe73c39.zip
gitbook-82f94b010f1d77957c9d1b0967dcdd5eafe73c39.tar.gz
gitbook-82f94b010f1d77957c9d1b0967dcdd5eafe73c39.tar.bz2
Remove concept of generator, to merge it with Output
Diffstat (limited to 'lib/page')
-rw-r--r--lib/page/index.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/page/index.js b/lib/page/index.js
index 711e0e1..7074780 100644
--- a/lib/page/index.js
+++ b/lib/page/index.js
@@ -84,7 +84,7 @@ Page.prototype.parse = function(opts) {
var that = this;
opts = _.defaults(opts || {}, {
-
+ linkPages: true
});
@@ -123,9 +123,10 @@ Page.prototype.parse = function(opts) {
// Normalize HTML output
.then(function() {
var pipelineOpts = _.extend({
-
// Replace links to page of summary
onRelativeLink: function(href) {
+ if (!opts.linkPages) return href;
+
var to = that.book.getPage(href);
if (to) return to.outputPath();