File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
src/datascience-ui/interactive-common Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change
1
+ Fix display of SVG images from previously executed ipynb files.
Original file line number Diff line number Diff line change @@ -246,12 +246,18 @@ export class CellOutput extends React.Component<ICellOutputProps> {
246
246
try {
247
247
const mimeBundle = copy . data as nbformat . IMimeBundle ;
248
248
let data : nbformat . MultilineString | JSONObject = mimeBundle [ mimeType ] ;
249
+ // For un-executed output we might get text or svg output as multiline string arrays
250
+ // we want to concat those so we don't display a bunch of weird commas as we expect
251
+ // Single strings in our output
252
+ if ( Array . isArray ( data ) ) {
253
+ data = concatMultilineStringOutput ( data as nbformat . MultilineString ) ;
254
+ }
249
255
250
256
// Text based mimeTypes don't get a white background
251
257
if ( / ^ t e x t \/ / . test ( mimeType ) ) {
252
258
return {
253
259
mimeType,
254
- data : concatMultilineStringOutput ( data as nbformat . MultilineString ) ,
260
+ data,
255
261
isText,
256
262
isError,
257
263
renderWithScrollbars : true ,
You can’t perform that action at this time.
0 commit comments