From 1cff58fec83bdc14a3e45162ca908e2f06dafe23 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sat, 6 Jun 2020 21:41:41 +0000 Subject: [PATCH] remove cruft --- src/static/js/ace2_inner.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index 44ac275e4..e599d0b5f 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -5167,8 +5167,6 @@ 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; @@ -5187,9 +5185,7 @@ function Ace2Inner(){ if(togglingOn){ mods.push([n, allLinesAreList ? 'indent' + level : (t ? type + level : type + '1')]); - } - - if(!togglingOn){ + }else{ // 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 @@ -5197,7 +5193,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 } }