Requested changes applied

pull/389/head
Zignature 2 years ago
parent 5df842b630
commit 2cdc11848a

@ -793,17 +793,13 @@ function toggleHeading3(editor) {
*/
function toggleUnorderedList(editor) {
var cm = editor.codemirror;
var liststyle = editor.options.unorderedListStyle;
liststyle = (
liststyle != undefined
&& liststyle !== ''
&& liststyle.length == 1
)
? liststyle
: '*';
var listStyle = '*'; // Default
if (['-', '+', '*'].includes(editor.options.unorderedListStyle)) {
listStyle = editor.options.unorderedListStyle;
}
_toggleLine(cm, 'unordered-list', liststyle);
_toggleLine(cm, 'unordered-list', listStyle);
}
@ -1210,7 +1206,7 @@ function _toggleLine(cm, name, liststyle) {
var _checkChar = function (name, char) {
var map = {
'quote': '>',
'unordered-list': '\\'.liststyle,
'unordered-list': '\\' + liststyle,
'ordered-list': '\\d+.',
};
var rt = new RegExp(map[name]);

Loading…
Cancel
Save