From a885f9195c03c5280a83333d0d641b0ef2995fb2 Mon Sep 17 00:00:00 2001 From: "Jessica B. Hamrick" Date: Thu, 29 Oct 2015 11:15:32 -0700 Subject: [PATCH] Alias execute_cell to execute_marked_cells --- notebook/static/notebook/js/notebook.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/notebook/static/notebook/js/notebook.js b/notebook/static/notebook/js/notebook.js index a9f337b9e..488a46d5b 100644 --- a/notebook/static/notebook/js/notebook.js +++ b/notebook/static/notebook/js/notebook.js @@ -2005,6 +2005,17 @@ define(function (require) { this.execute_cells(this.get_marked_indices()); }; + /** + * Alias for execute_marked_cells, for backwards compatibility -- + * previously, doing "Run Cell" would only ever run a single cell (hence + * `execute_cell`), but now it runs all marked cells, so that's the + * preferable function to use. But it is good to keep this function to avoid + * breaking existing extensions, etc. + */ + Notebook.prototype.execute_cell = function () { + this.execute_marked_cells(); + }; + /** * Execute or render cell outputs and insert a new cell below. */