From 91966533df41f9cc501e2f18c8b68605e4ceba89 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sat, 6 Jun 2020 21:56:23 +0000 Subject: [PATCH] ugh wtf --- src/static/js/ace2_inner.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index e0286bc57..57f92d239 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -5168,11 +5168,13 @@ function Ace2Inner(){ var listType = /([a-z]+)([0-9]+)/.exec(getLineListType(n)); // Used to outdent if ol is removed +/* if(allLinesAreList){ var togglingOn = false; }else{ var togglingOn = true; } +*/ if (listType) { @@ -5183,6 +5185,10 @@ function Ace2Inner(){ if(t === listType) togglingOn = false; + if (allLinesAreList && level != 1) { level = level - 1; } + else if (t && !allLinesAreList) { level = level + 1; } + +/* if(togglingOn){ mods.push([n, allLinesAreList ? 'indent' + level : (t ? type + level : type + '1')]); }else{ @@ -5197,7 +5203,7 @@ function Ace2Inner(){ setLineListType(n, "indent"+level); // outdent } } - +*/ } _.each(mods, function(mod){