diff options
author | Brian Lim <brian.lim.developer@gmail.com> | 2016-01-18 23:57:40 -0500 |
---|---|---|
committer | Brian Lim <brian.lim.developer@gmail.com> | 2016-01-18 23:57:40 -0500 |
commit | ae033a1e867a722cafa49337ffbccec2e7452f6d (patch) | |
tree | 17381469c01fbc8be65b11da9b7b951ac7c3a3f1 /src/static | |
parent | f9937343c795ce56485dfe969a11f333786f89e5 (diff) | |
download | etherpad-lite-ae033a1e867a722cafa49337ffbccec2e7452f6d.zip |
Fix for 2844 and 2812
Diffstat (limited to 'src/static')
-rw-r--r-- | src/static/js/ace2_inner.js | 6 |
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')]); } |