mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-13 04:54:28 -06:00
list toggle fix
This commit is contained in:
parent
61991d1e7d
commit
6787ae706e
@ -919,14 +919,14 @@ function _toggleLine(cm, name) {
|
||||
text = text.replace(repl[name], "$1");
|
||||
} else {
|
||||
var arr = listRegexp.exec(text);
|
||||
if (arr !== null && arr[1]) {
|
||||
var char = map[name];
|
||||
if (arr[2] && arr[2] == map[name]) {
|
||||
char = '';
|
||||
if(arr !== null && arr[1]) {
|
||||
var char = map[name];
|
||||
if(arr[2] && arr[2] == map[name]) {
|
||||
char = "";
|
||||
}
|
||||
text = arr[1] + char + arr[3] +text.replace(whitespacesRegexp, '').replace(repl[name], "$1");
|
||||
text = arr[1] + char + arr[3] + text.replace(whitespacesRegexp, "").replace(repl[name], "$1");
|
||||
} else {
|
||||
text = map[name] + ' ' + text;
|
||||
text = map[name] + " " + text;
|
||||
}
|
||||
}
|
||||
cm.replaceRange(text, {
|
||||
|
Loading…
x
Reference in New Issue
Block a user