diff options
author | Egil Moeller <egil.moller@freecode.no> | 2010-03-25 19:14:53 +0100 |
---|---|---|
committer | Egil Moeller <egil.moller@freecode.no> | 2010-03-25 19:14:53 +0100 |
commit | 20014050bf91266757b2c1ba82ab333638fe570d (patch) | |
tree | b4de4f05376f30cab0ca4a729a99f841a4ef123f /infrastructure/ace/www/linestylefilter.js | |
parent | f7dd3aa34cad8a59ad00172339c565731ad80fbb (diff) | |
download | etherpad-20014050bf91266757b2c1ba82ab333638fe570d.tar.gz etherpad-20014050bf91266757b2c1ba82ab333638fe570d.tar.xz etherpad-20014050bf91266757b2c1ba82ab333638fe570d.zip |
Added aceCreateDomline hook plus some code cleanup in the ace
Diffstat (limited to 'infrastructure/ace/www/linestylefilter.js')
-rw-r--r-- | infrastructure/ace/www/linestylefilter.js | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/infrastructure/ace/www/linestylefilter.js b/infrastructure/ace/www/linestylefilter.js index 71bc30d..d69376a 100644 --- a/infrastructure/ace/www/linestylefilter.js +++ b/infrastructure/ace/www/linestylefilter.js @@ -21,7 +21,6 @@ // requires: easysync2.Changeset // requires: top // requires: plugins -// requires: plugins // requires: undefined var linestylefilter = {}; @@ -239,13 +238,11 @@ linestylefilter.textAndClassFuncSplitter = function(func, splitPointsOpt) { linestylefilter.getFilterStack = function(lineText, textAndClassFunc, browser) { var func = linestylefilter.getURLFilter(lineText, textAndClassFunc); - /* Handle both client and server side situation */ - - var pluginModule = (top == undefined) ? plugins : top.plugins; - - var hookFilters = pluginModule.callHook("aceGetFilterStack", {linestylefilter:linestylefilter, browser:browser}); - for (var i = 0; i < hookFilters.length; i++) - func = hookFilters[i](lineText, func); + var hookFilters = ((top == undefined) ? plugins : top.plugins).callHook( + "aceGetFilterStack", {linestylefilter:linestylefilter, browser:browser}); + hookFilters.map(function (hookFilter) { + func = hookFilter(lineText, func); + }); if (browser !== undefined && browser.msie) { // IE7+ will take an e-mail address like <foo@bar.com> and linkify it to foo@bar.com. |