##// END OF EJS Templates
fix small bug in dropping metadata
Paul Ivanov -
Show More
@@ -740,8 +740,6 b' var IPython = (function (IPython) {'
740 // JSON serialization
740 // JSON serialization
741
741
742 OutputArea.prototype.fromJSON = function (outputs) {
742 OutputArea.prototype.fromJSON = function (outputs) {
743 // add here the mapping of short key to mime type
744 // TODO: remove this when we update to nbformat 4
745 var len = outputs.length;
743 var len = outputs.length;
746 var data;
744 var data;
747
745
@@ -757,6 +755,7 b' var IPython = (function (IPython) {'
757 var msg_type = data.output_type;
755 var msg_type = data.output_type;
758 if (msg_type === "display_data" || msg_type === "pyout") {
756 if (msg_type === "display_data" || msg_type === "pyout") {
759 // convert short keys to mime keys
757 // convert short keys to mime keys
758 // TODO: remove mapping of short keys when we update to nbformat 4
760 data = this.rename_keys(data, OutputArea.mime_map_r);
759 data = this.rename_keys(data, OutputArea.mime_map_r);
761 data.metadata = this.rename_keys(data.metadata, OutputArea.mime_map_r);
760 data.metadata = this.rename_keys(data.metadata, OutputArea.mime_map_r);
762 }
761 }
@@ -779,7 +778,7 b' var IPython = (function (IPython) {'
779 if (msg_type === "display_data" || msg_type === "pyout") {
778 if (msg_type === "display_data" || msg_type === "pyout") {
780 // convert mime keys to short keys
779 // convert mime keys to short keys
781 data = this.rename_keys(data, OutputArea.mime_map);
780 data = this.rename_keys(data, OutputArea.mime_map);
782 data.metadata = this.rename_keys(data, OutputArea.mime_map);
781 data.metadata = this.rename_keys(data.metadata, OutputArea.mime_map);
783 }
782 }
784 outputs[i] = data;
783 outputs[i] = data;
785 }
784 }
General Comments 0
You need to be logged in to leave comments. Login now