mirror of
https://github.com/jupyter/notebook.git
synced 2025-02-05 12:19:58 +08:00
Merge pull request #2774 from iamlemec/master
Factor out output_prompt_function, as is done with input prompt
This commit is contained in:
commit
9dabaa2ccf
@ -467,6 +467,11 @@ define([
|
||||
this.element.trigger('changed', {output_area: this});
|
||||
};
|
||||
|
||||
OutputArea.output_prompt_classical = function(prompt_value) {
|
||||
return $('<bdi>').text(i18n.msg.sprintf(i18n.msg._('Out[%d]:'),prompt_value));
|
||||
};
|
||||
|
||||
OutputArea.output_prompt_function = OutputArea.output_prompt_classical;
|
||||
|
||||
OutputArea.prototype.append_execute_result = function (json) {
|
||||
var n = json.execution_count || ' ';
|
||||
@ -476,9 +481,7 @@ define([
|
||||
toinsert.find('div.prompt')
|
||||
.addClass('output_prompt')
|
||||
.empty()
|
||||
.append(
|
||||
$('<bdi>').text(i18n.msg.sprintf(i18n.msg._('Out[%d]:'),n))
|
||||
);
|
||||
.append(OutputArea.output_prompt_function(n));
|
||||
}
|
||||
var inserted = this.append_mime_type(json, toinsert);
|
||||
if (inserted) {
|
||||
|
Loading…
Reference in New Issue
Block a user