mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-24 12:05:22 +08:00
Merge pull request #5545 from adamblake/patch-1
Respect cell.is_editable during find-and-replace
This commit is contained in:
commit
3941004e68
@ -308,6 +308,10 @@ define([
|
|||||||
var cells = get_cells(env);
|
var cells = get_cells(env);
|
||||||
for (var c = 0; c < cells.length; c++) {
|
for (var c = 0; c < cells.length; c++) {
|
||||||
var cell = cells[c];
|
var cell = cells[c];
|
||||||
|
if (!cell.is_editable()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
var oldvalue = cell.code_mirror.getValue();
|
var oldvalue = cell.code_mirror.getValue();
|
||||||
var newvalue = oldvalue.replace(reg , replaceValue);
|
var newvalue = oldvalue.replace(reg , replaceValue);
|
||||||
cell.code_mirror.setValue(newvalue);
|
cell.code_mirror.setValue(newvalue);
|
||||||
|
Loading…
Reference in New Issue
Block a user