Revert "remove cruft"

This reverts commit 1cff58fec8.
outdent-ol-on-click
John McLear 2020-06-06 22:13:32 +00:00
parent 5174937392
commit cc2736ae3d
1 changed files with 6 additions and 2 deletions

View File

@ -5167,6 +5167,8 @@ function Ace2Inner(){
var level = 0;
var listType = /([a-z]+)([0-9]+)/.exec(getLineListType(n));
var togglineOn = false;
// Used to outdent if ol is removed
if(allLinesAreList){
togglingOn = false;
@ -5185,7 +5187,9 @@ function Ace2Inner(){
if(togglingOn){
mods.push([n, allLinesAreList ? 'indent' + level : (t ? type + level : type + '1')]);
}else{
}
if(!togglingOn){
// scrap the entire indentation and list type
if(level === 1){ // if outdending but are the first item in the list then outdent
setLineListType(n, ''); // outdent
@ -5193,7 +5197,7 @@ function Ace2Inner(){
// else change to indented not bullet
if(level > 1){
setLineListType(n, ''); // remove bullet
let newLevel = level + 1;
let newLevel = level+1;
setLineListType(n, "indent"+level); // outdent
}
}