diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-03-30 16:50:26 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-03-30 16:50:26 +0200 |
commit | fff7c5cc3ac9191765e0957fecf994e813923225 (patch) | |
tree | 0da5bd4463568b34bf58cfa108570af099b6662e /lib/configuration.js | |
parent | 3065742b73ae6ad0f8aa75eb0eafcdd8e395a108 (diff) | |
download | gitbook-fff7c5cc3ac9191765e0957fecf994e813923225.zip gitbook-fff7c5cc3ac9191765e0957fecf994e813923225.tar.gz gitbook-fff7c5cc3ac9191765e0957fecf994e813923225.tar.bz2 |
Add back support for options.originalInput
Related to rtCamp/gitbook-plugin-edit-link#2
Diffstat (limited to 'lib/configuration.js')
-rw-r--r-- | lib/configuration.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/configuration.js b/lib/configuration.js index fee40fc..70b2eb5 100644 --- a/lib/configuration.js +++ b/lib/configuration.js @@ -75,6 +75,20 @@ var Configuration = function(book, options) { return that.book.root; } }); + + // options.originalInput == book.parent.root + Object.defineProperty(this.options, "originalInput", { + get: function () { + return that.book.parent? that.book.parent.root : undefined; + } + }); + + // options.originalOutput == book.parent.options.output + Object.defineProperty(this.options, "originalOutput", { + get: function () { + return that.book.parent? that.book.parent.options.output : undefined; + } + }); }; // Read and parse the configuration |