mirror of
https://github.com/jupyter/notebook.git
synced 2025-02-05 12:19:58 +08:00
use $.map for setting cm options
This commit is contained in:
parent
7ede5e291f
commit
85fb8e1085
@ -155,16 +155,13 @@ function($,
|
||||
|
||||
Editor.prototype._set_codemirror_options = function (options) {
|
||||
// update codemirror options from a dict
|
||||
for (var opt in options) {
|
||||
if (!options.hasOwnProperty(opt)) {
|
||||
continue;
|
||||
}
|
||||
var value = options[opt];
|
||||
var codemirror = this.codemirror;
|
||||
$.map(options, function (value, opt) {
|
||||
if (value === null) {
|
||||
value = CodeMirror.defaults[opt];
|
||||
}
|
||||
this.codemirror.setOption(opt, value);
|
||||
}
|
||||
codemirror.setOption(opt, value);
|
||||
});
|
||||
};
|
||||
|
||||
Editor.prototype.update_codemirror_options = function (options) {
|
||||
|
Loading…
Reference in New Issue
Block a user