Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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.
  • Loading branch information...
commit 187d009016c602b4a0c432c0d433b66073e75067 2 parents 232fa81 + c17d035
@fperez fperez authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  IPython/frontend/html/notebook/static/js/notebook.js
View
3  IPython/frontend/html/notebook/static/js/notebook.js
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.