Fix for 2844 and 2812

pull/2887/head
Brian Lim 2016-01-18 23:57:40 -05:00
parent f9937343c7
commit ae033a1e86
1 changed files with 6 additions and 0 deletions

View File

@ -5365,6 +5365,12 @@ function Ace2Inner(){
level = Number(listType[2]);
}
var t = getLineListType(n);
// if already a list, deindent
if (allLinesAreList && level != 1) { level = level - 1; }
// if already indented, then add a level of indentation to the list
else if (t && !allLinesAreList) { level = level + 1; }
mods.push([n, allLinesAreList ? 'indent' + level : (t ? type + level : type + '1')]);
}