mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-20 06:29:53 +01:00
Merge pull request #2420 from ether/fix/clean-up-after-removing-list-attrs
Clean-up after removing list attribute: Remove list numbering attribute
This commit is contained in:
commit
b5c671a9b6
2 changed files with 3 additions and 2 deletions
|
@ -173,7 +173,7 @@ AttributeManager.prototype = _(AttributeManager.prototype).extend({
|
||||||
if(hasMarker){
|
if(hasMarker){
|
||||||
ChangesetUtils.buildKeepRange(this.rep, builder, loc, (loc = [lineNum, 0]));
|
ChangesetUtils.buildKeepRange(this.rep, builder, loc, (loc = [lineNum, 0]));
|
||||||
// If length == 4, there's [author, lmkr, insertorder, + the attrib being removed] thus we can remove the marker entirely
|
// If length == 4, there's [author, lmkr, insertorder, + the attrib being removed] thus we can remove the marker entirely
|
||||||
if(attribs.length == 4) ChangesetUtils.buildRemoveRange(this.rep, builder, loc, (loc = [lineNum, 1]))
|
if(attribs.length <= 4) ChangesetUtils.buildRemoveRange(this.rep, builder, loc, (loc = [lineNum, 1]))
|
||||||
else ChangesetUtils.buildKeepRange(this.rep, builder, loc, (loc = [lineNum, 1]), attribs, this.rep.apool);
|
else ChangesetUtils.buildKeepRange(this.rep, builder, loc, (loc = [lineNum, 1]), attribs, this.rep.apool);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5073,6 +5073,7 @@ function Ace2Inner(){
|
||||||
{
|
{
|
||||||
if(listType == ''){
|
if(listType == ''){
|
||||||
documentAttributeManager.removeAttributeOnLine(lineNum, listAttributeName);
|
documentAttributeManager.removeAttributeOnLine(lineNum, listAttributeName);
|
||||||
|
documentAttributeManager.removeAttributeOnLine(lineNum, 'start');
|
||||||
}else{
|
}else{
|
||||||
documentAttributeManager.setAttributeOnLine(lineNum, listAttributeName, listType);
|
documentAttributeManager.setAttributeOnLine(lineNum, listAttributeName, listType);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue