Skip to content

Commit

Permalink
Merge pull request #4480 from gnestor/output-json-array
Browse files Browse the repository at this point in the history
Don't convert JSON arrays to strings
  • Loading branch information
jasongrout committed Apr 27, 2018
2 parents 64183d8 + 54203d5 commit 01f7b43
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions packages/rendermime/src/outputmodel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,14 +343,7 @@ namespace Private {
function convertBundle(bundle: nbformat.IMimeBundle): JSONObject {
let map: JSONObject = Object.create(null);
for (let mimeType in bundle) {
let item = bundle[mimeType];
// Convert multi-line strings to strings.
if (JSONExt.isArray(item)) {
item = (item as string[]).join('\n');
} else if (!JSONExt.isPrimitive(item)) {
item = JSON.parse(JSON.stringify(item));
}
map[mimeType] = item;
map[mimeType] = extract(bundle, mimeType);
}
return map;
}
Expand Down

0 comments on commit 01f7b43

Please sign in to comment.