mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-30 12:11:32 +08:00
Merge pull request #1621 from ivanov/clear-input-prompt-on-clear-all-output
clear In[] prompt numbers on "Clear All Output" For more version-control-friendly `.ipynb` files, this strips the `In[]` prompt numbers when doing a "Clear all output". This reduces the amount of noise in commit-to-commit diffs that would otherwise show the (highly variable) prompt number changes.
This commit is contained in:
commit
e5e200eaa7
@ -874,6 +874,9 @@ var IPython = (function (IPython) {
|
||||
for (var i=0; i<ncells; i++) {
|
||||
if (cells[i] instanceof IPython.CodeCell) {
|
||||
cells[i].clear_output(true,true,true);
|
||||
// Make all In[] prompts blank, as well
|
||||
// TODO: make this configurable (via checkbox?)
|
||||
cells[i].set_input_prompt();
|
||||
}
|
||||
};
|
||||
this.dirty = true;
|
||||
|
Loading…
Reference in New Issue
Block a user