summaryrefslogtreecommitdiffstats
path: root/lib/configuration.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-03-30 16:50:26 +0200
committerSamy Pessé <samypesse@gmail.com>2015-03-30 16:50:26 +0200
commitfff7c5cc3ac9191765e0957fecf994e813923225 (patch)
tree0da5bd4463568b34bf58cfa108570af099b6662e /lib/configuration.js
parent3065742b73ae6ad0f8aa75eb0eafcdd8e395a108 (diff)
downloadgitbook-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.js14
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