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