summaryrefslogtreecommitdiffstats
path: root/lib/plugins/plugin.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/plugins/plugin.js')
-rw-r--r--lib/plugins/plugin.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/plugins/plugin.js b/lib/plugins/plugin.js
index 5329c66..f678111 100644
--- a/lib/plugins/plugin.js
+++ b/lib/plugins/plugin.js
@@ -10,7 +10,7 @@ var Promise = require('../utils/promise');
var error = require('../utils/error');
var gitbook = require('../gitbook');
var registry = require('./registry');
-var pluginCtx = require('./context');
+var compatibility = require('./compatibility');
var HOOKS = [
'init', 'finish', 'finish:before', 'config', 'page', 'page:before'
@@ -48,7 +48,7 @@ BookPlugin.prototype.isLoaded = function() {
// Bind a function to the plugin's context
BookPlugin.prototype.bind = function(fn) {
- return fn.bind(pluginCtx(this));
+ return fn.bind(compatibility.pluginCtx(this));
};
// Load this plugin
@@ -270,7 +270,7 @@ BookPlugin.prototype.getFilters = function() {
return _.mapValues(this.content.filters || {}, function(fn, filter) {
return function() {
- var ctx = _.extend(pluginCtx(that), this);
+ var ctx = _.extend(compatibility.pluginCtx(that), this);
return fn.apply(ctx, arguments);
};
@@ -286,7 +286,7 @@ BookPlugin.prototype.getBlocks = function() {
var fn = block.process;
block.process = function() {
- var ctx = _.extend(pluginCtx(that), this);
+ var ctx = _.extend(compatibility.pluginCtx(that), this);
return fn.apply(ctx, arguments);
};