function hook(name) {
        return pluginCompatibility.pageHook(that, function(ctx) {
            return output.plugins.hook(name, ctx);
        })
        .then(function(result) {
            if(_.isString(result)) that.update(result);
        });
    }
// using an utility to "keep" compatibility with gitbook 2
using an utility to "keep" compatibility with gitbook 2
using an utility to " keep " compatibility with gitbook 2
function hook(name) {
        return pluginCompatibility.pageHook(that, function(ctx) {
            return output.plugins.hook(name, ctx);
        })
        .then(function(result) {
            if(_.isString(result)) that.update(result);
        });
    }
function hook ( name ) { return pluginCompatibility . pageHook ( that , function ( ctx ) { return output . plugins . hook ( name , ctx ) ; } ) . then ( function ( result ) { if ( _ . isString ( result ) ) that . update ( result ) ; } ) ; }
using an utility to "keep" compatibility with gitbook 2
using an utility to " keep " compatibility with gitbook 2