summaryrefslogtreecommitdiff
path: root/src/static/js/ace2_inner.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/static/js/ace2_inner.js')
-rw-r--r--src/static/js/ace2_inner.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js
index 5b7b48a0..8576ee33 100644
--- a/src/static/js/ace2_inner.js
+++ b/src/static/js/ace2_inner.js
@@ -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')]);
}