mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-17 06:54:27 -06:00
Requested changes applied
This commit is contained in:
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…
x
Reference in New Issue
Block a user