Clean-up after removing list attribute: Remove list numbering attribute

This commit is contained in:
Marcel Klehr 2014-12-30 17:45:26 +01:00
parent c20a7e9bce
commit cfe75c7f3f
2 changed files with 3 additions and 2 deletions

View file

@ -169,11 +169,11 @@ AttributeManager.prototype = _(AttributeManager.prototype).extend({
if(attrib[0] === attributeName) return [attributeName, null]
return attrib
})
if(hasMarker){
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(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);
}