From 3eec0a0f7f9f50371738246d8bb63e0862f6ee33 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sat, 6 Jun 2020 22:55:32 +0000 Subject: [PATCH] lets try this --- src/static/js/ace2_inner.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index 44ac275e4..30f8c25bf 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -5167,13 +5167,11 @@ 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; + var togglingOn = false; }else{ - togglingOn = true; + var togglingOn = true; } if (listType) @@ -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