mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-17 23:14:29 -06:00
Requested changes applied
This commit is contained in:
parent
5df842b630
commit
2cdc11848a
@ -793,17 +793,13 @@ function toggleHeading3(editor) {
|
|||||||
*/
|
*/
|
||||||
function toggleUnorderedList(editor) {
|
function toggleUnorderedList(editor) {
|
||||||
var cm = editor.codemirror;
|
var cm = editor.codemirror;
|
||||||
var liststyle = editor.options.unorderedListStyle;
|
|
||||||
|
|
||||||
liststyle = (
|
var listStyle = '*'; // Default
|
||||||
liststyle != undefined
|
if (['-', '+', '*'].includes(editor.options.unorderedListStyle)) {
|
||||||
&& liststyle !== ''
|
listStyle = editor.options.unorderedListStyle;
|
||||||
&& liststyle.length == 1
|
}
|
||||||
)
|
|
||||||
? liststyle
|
|
||||||
: '*';
|
|
||||||
|
|
||||||
_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 _checkChar = function (name, char) {
|
||||||
var map = {
|
var map = {
|
||||||
'quote': '>',
|
'quote': '>',
|
||||||
'unordered-list': '\\'.liststyle,
|
'unordered-list': '\\' + liststyle,
|
||||||
'ordered-list': '\\d+.',
|
'ordered-list': '\\d+.',
|
||||||
};
|
};
|
||||||
var rt = new RegExp(map[name]);
|
var rt = new RegExp(map[name]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user