@@ -195,7 +195,7 @@ define([
195
195
reject ( { result : output , type : 'error' , msg : { content : { ename : output . ename , evalue : simpleEvalue , detail : convertedEvalue } } } ) ;
196
196
} else {
197
197
if ( output . output_type === 'stream' ) {
198
- result = String ( output . text [ 0 ] ) ;
198
+ result = String ( output . text . join ( '\n' ) ) ;
199
199
type = 'text' ;
200
200
msg = {
201
201
content : {
@@ -265,12 +265,12 @@ define([
265
265
var message = content . text ;
266
266
resolve ( {
267
267
result : message ,
268
- type : type ,
268
+ type : 'text' ,
269
269
msg : {
270
270
content : {
271
- name : type ,
271
+ name : 'text' ,
272
272
data : {
273
- [ type ] : message
273
+ 'text' : message
274
274
}
275
275
}
276
276
}
@@ -315,13 +315,13 @@ define([
315
315
if ( msg . content . data [ 'image/png' ] ) {
316
316
result = String ( msg . content . data [ 'image/png' ] ) ;
317
317
type = 'image/png' ;
318
- } else if ( msg . content . data [ 'text/plain' ] ) {
319
- result = String ( msg . content . data [ 'text/plain' ] ) ;
320
- type = 'text/plain' ;
321
318
} else if ( msg . content . data [ 'text/html' ] ) {
322
319
result = String ( msg . content . data [ 'text/html' ] ) ;
323
320
type = 'text/html' ;
324
- }
321
+ } else if ( msg . content . data [ 'text/plain' ] ) {
322
+ result = String ( msg . content . data [ 'text/plain' ] ) ;
323
+ type = 'text/plain' ;
324
+ }
325
325
}
326
326
resolve ( { result : result , type : type , msg : msg } ) ;
327
327
} catch ( ex ) {
@@ -342,13 +342,13 @@ define([
342
342
if ( msg . content . data [ 'image/png' ] ) {
343
343
result = String ( msg . content . data [ 'image/png' ] ) ;
344
344
type = 'image/png' ;
345
- } else if ( msg . content . data [ 'text/plain' ] ) {
346
- result = String ( msg . content . data [ 'text/plain' ] ) ;
347
- type = 'text/plain' ;
348
345
} else if ( msg . content . data [ 'text/html' ] ) {
349
346
result = String ( msg . content . data [ 'text/html' ] ) ;
350
347
type = 'text/html' ;
351
- }
348
+ } else if ( msg . content . data [ 'text/plain' ] ) {
349
+ result = String ( msg . content . data [ 'text/plain' ] ) ;
350
+ type = 'text/plain' ;
351
+ }
352
352
}
353
353
resolve ( { result : result , type : type , msg : msg } ) ;
354
354
} catch ( ex ) {
0 commit comments