mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
[fix] Consider line attribs of plugins when building changesets
When checking the places on text that are identical between content before and after a changeset, we were considering only the standard (Etherpad-core) attributes, and not taking into account attributes created by the plugins. One consequence was that the '*' marker of lines with line attribs were being kept, even when the new lines have different line attribs. See #3118 for more details. Fix #3118.
This commit is contained in:
parent
deed74c8c8
commit
b2d9f57338
1 changed files with 3 additions and 4 deletions
|
@ -1782,9 +1782,9 @@ function Ace2Inner(){
|
||||||
return !!STYLE_ATTRIBS[aname];
|
return !!STYLE_ATTRIBS[aname];
|
||||||
}
|
}
|
||||||
|
|
||||||
function isIncorpedAttribute(aname)
|
function isOtherIncorpedAttribute(aname)
|
||||||
{
|
{
|
||||||
return ( !! STYLE_ATTRIBS[aname]) || ( !! OTHER_INCORPED_ATTRIBS[aname]);
|
return !!OTHER_INCORPED_ATTRIBS[aname];
|
||||||
}
|
}
|
||||||
|
|
||||||
function insertDomLines(nodeToAddAfter, infoStructs, isTimeUp)
|
function insertDomLines(nodeToAddAfter, infoStructs, isTimeUp)
|
||||||
|
@ -2526,7 +2526,6 @@ function Ace2Inner(){
|
||||||
|
|
||||||
function doIncorpLineSplice(startLine, deleteCount, newLineEntries, lineAttribs, hints)
|
function doIncorpLineSplice(startLine, deleteCount, newLineEntries, lineAttribs, hints)
|
||||||
{
|
{
|
||||||
|
|
||||||
var startOldChar = rep.lines.offsetOfIndex(startLine);
|
var startOldChar = rep.lines.offsetOfIndex(startLine);
|
||||||
var endOldChar = rep.lines.offsetOfIndex(startLine + deleteCount);
|
var endOldChar = rep.lines.offsetOfIndex(startLine + deleteCount);
|
||||||
|
|
||||||
|
@ -2760,7 +2759,7 @@ function Ace2Inner(){
|
||||||
{
|
{
|
||||||
function incorpedAttribFilter(anum)
|
function incorpedAttribFilter(anum)
|
||||||
{
|
{
|
||||||
return isStyleAttribute(rep.apool.getAttribKey(anum));
|
return !isOtherIncorpedAttribute(rep.apool.getAttribKey(anum));
|
||||||
}
|
}
|
||||||
|
|
||||||
function attribRuns(attribs)
|
function attribRuns(attribs)
|
||||||
|
|
Loading…
Reference in a new issue