mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-10 00:45:01 -04:00
Use methods for this behavior.
This commit is contained in:
parent
db4e59af82
commit
fa289cfd4a
1 changed files with 17 additions and 2 deletions
|
@ -76,8 +76,6 @@ function DOMLine(nonEmpty, doesWrap, browser, document) {
|
||||||
this.postHtml = '';
|
this.postHtml = '';
|
||||||
this.curHTML = null;
|
this.curHTML = null;
|
||||||
|
|
||||||
this.perTextNodeProcess = (doesWrap ? _.identity : this.processSpaces);
|
|
||||||
this.perHtmlLineProcess = (doesWrap ? this.processSpaces : _.identity);
|
|
||||||
this.lineClass = 'ace-line';
|
this.lineClass = 'ace-line';
|
||||||
|
|
||||||
// Apparently overridden at the instance level sometimes...
|
// Apparently overridden at the instance level sometimes...
|
||||||
|
@ -87,6 +85,23 @@ function DOMLine(nonEmpty, doesWrap, browser, document) {
|
||||||
|
|
||||||
DOMLine.prototype = {};
|
DOMLine.prototype = {};
|
||||||
(function () {
|
(function () {
|
||||||
|
|
||||||
|
this.perTextNodeProcess = function (s) {
|
||||||
|
if (this.doesWrap) {
|
||||||
|
return _.identity(s);
|
||||||
|
} else {
|
||||||
|
return this.processSpaces(s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.perHtmlLineProcess = function (s) {
|
||||||
|
if (this.doesWrap) {
|
||||||
|
return this.processSpaces(s);
|
||||||
|
} else {
|
||||||
|
return _.identity(s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.processSpaces = function(s)
|
this.processSpaces = function(s)
|
||||||
{
|
{
|
||||||
return processSpaces(s, this.doesWrap);
|
return processSpaces(s, this.doesWrap);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue