mirror of
https://github.com/sparksuite/simplemde-markdown-editor.git
synced 2025-09-24 16:40:55 -06:00
'Let' itself has a block level scope, function scope is not required
This commit is contained in:
parent
a58eff8097
commit
3cb8fa13b3
File diff suppressed because one or more lines are too long
@ -16925,15 +16925,17 @@ var SimpleMDE = function (_Action) {
|
|||||||
var self = this;
|
var self = this;
|
||||||
var keyMaps = {};
|
var keyMaps = {};
|
||||||
|
|
||||||
for (var key in options.shortcuts) {
|
var _loop = function _loop(key) {
|
||||||
// null stands for "do not bind this command"
|
// null stands for "do not bind this command"
|
||||||
if (options.shortcuts[key] !== null && _metadata.bindings[key] !== null) {
|
if (options.shortcuts[key] !== null && _metadata.bindings[key] !== null) {
|
||||||
(function (key) {
|
keyMaps[_utils2.default.fixShortcut(options.shortcuts[key])] = function () {
|
||||||
keyMaps[_utils2.default.fixShortcut(options.shortcuts[key])] = function () {
|
return _metadata.bindings[key](self);
|
||||||
return _metadata.bindings[key](self);
|
};
|
||||||
};
|
|
||||||
})(key);
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
for (var key in options.shortcuts) {
|
||||||
|
_loop(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
keyMaps["Enter"] = "newlineAndIndentContinueMarkdownList";
|
keyMaps["Enter"] = "newlineAndIndentContinueMarkdownList";
|
||||||
|
2
dist/simplemde.min.js
vendored
2
dist/simplemde.min.js
vendored
File diff suppressed because one or more lines are too long
@ -179,9 +179,7 @@ class SimpleMDE extends Action {
|
|||||||
for(let key in options.shortcuts) {
|
for(let key in options.shortcuts) {
|
||||||
// null stands for "do not bind this command"
|
// null stands for "do not bind this command"
|
||||||
if(options.shortcuts[key] !== null && bindings[key] !== null) {
|
if(options.shortcuts[key] !== null && bindings[key] !== null) {
|
||||||
(function(key) {
|
keyMaps[utils.fixShortcut(options.shortcuts[key])] = () => bindings[key](self);
|
||||||
keyMaps[utils.fixShortcut(options.shortcuts[key])] = () => bindings[key](self);
|
|
||||||
})(key);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user