mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 23:46:14 -04:00
use underscore.js
This commit is contained in:
parent
692e77b4e5
commit
e559df18ce
13 changed files with 1069 additions and 113 deletions
|
@ -28,9 +28,11 @@
|
|||
|
||||
var Security = require('./security');
|
||||
var hooks = require('./pluginfw/hooks');
|
||||
var _ = require('./underscore');
|
||||
|
||||
var Ace2Common = require('./ace2_common');
|
||||
var noop = Ace2Common.noop;
|
||||
var identity = Ace2Common.identity;
|
||||
|
||||
|
||||
var domline = {};
|
||||
|
||||
|
@ -88,8 +90,8 @@ domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument)
|
|||
return domline.processSpaces(s, doesWrap);
|
||||
}
|
||||
|
||||
var perTextNodeProcess = (doesWrap ? identity : processSpaces);
|
||||
var perHtmlLineProcess = (doesWrap ? processSpaces : identity);
|
||||
var perTextNodeProcess = (doesWrap ? _.identity : processSpaces);
|
||||
var perHtmlLineProcess = (doesWrap ? processSpaces : _.identity);
|
||||
var lineClass = 'ace-line';
|
||||
result.appendSpan = function(txt, cls)
|
||||
{
|
||||
|
@ -141,10 +143,10 @@ domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument)
|
|||
var extraOpenTags = "";
|
||||
var extraCloseTags = "";
|
||||
|
||||
hooks.callAll("aceCreateDomLine", {
|
||||
_.map(hooks.callAll("aceCreateDomLine", {
|
||||
domline: domline,
|
||||
cls: cls
|
||||
}).map(function(modifier)
|
||||
}), function(modifier)
|
||||
{
|
||||
cls = modifier.cls;
|
||||
extraOpenTags = extraOpenTags + modifier.extraOpenTags;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue