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:
Fernando Perez 2012-04-18 23:06:32 -07:00
commit e5e200eaa7

View File

@ -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;