diff options
author | Egil Moeller <egil.moller@freecode.no> | 2012-03-02 22:00:20 +0100 |
---|---|---|
committer | Egil Moeller <egil.moller@freecode.no> | 2012-03-02 22:00:20 +0100 |
commit | ce5d2d86850be0496467a16333c0646d71649f7c (patch) | |
tree | 56e4eed0c777c6f338b1dfaef4a1daabdd1ccce4 /src/static/js/domline.js | |
parent | 6cd391d3fb33f5c59fd0d1deaaa18c1034e0bd81 (diff) | |
parent | 6fd73ecfda27fd6639c30a4c05c6149d66f669ee (diff) | |
download | etherpad-lite-ce5d2d86850be0496467a16333c0646d71649f7c.zip |
Merge branch 'pita'
Resolved conflicts:
.gitignore
src/static/js/ace.js
src/static/js/ace2_inner.js
src/static/js/broadcast.js
src/static/js/domline.js
src/static/pad.html
src/static/timeslider.html
Ignored conflicts (please merge manually later):
node/server.js
src/node/utils/Minify.js
Diffstat (limited to 'src/static/js/domline.js')
-rw-r--r-- | src/static/js/domline.js | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/static/js/domline.js b/src/static/js/domline.js index 3df98dc0..11532409 100644 --- a/src/static/js/domline.js +++ b/src/static/js/domline.js @@ -28,15 +28,12 @@ var Security = require('ep_etherpad-lite/static/js/security'); var hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks'); -var map = require('ep_etherpad-lite/static/js/ace2_common').map; +var Ace2Common = require('ep_etherpad-lite/static/js/ace2_common'); +var map = Ace2Common.map; +var noop = Ace2Common.noop; +var identity = Ace2Common.identity; var domline = {}; -domline.noop = function() -{}; -domline.identity = function(x) -{ - return x; -}; domline.addToLineClass = function(lineClass, cls) { @@ -60,11 +57,11 @@ domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument) { var result = { node: null, - appendSpan: domline.noop, - prepareForAdd: domline.noop, - notifyAdded: domline.noop, - clearSpans: domline.noop, - finishUpdate: domline.noop, + appendSpan: noop, + prepareForAdd: noop, + notifyAdded: noop, + clearSpans: noop, + finishUpdate: noop, lineMarker: 0 }; @@ -91,7 +88,7 @@ domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument) { return domline.processSpaces(s, doesWrap); } - var identity = domline.identity; + var perTextNodeProcess = (doesWrap ? identity : processSpaces); var perHtmlLineProcess = (doesWrap ? processSpaces : identity); var lineClass = 'ace-line'; |