@@ -195,7 +195,7 @@ define([
195195 reject ( { result : output , type : 'error' , msg : { content : { ename : output . ename , evalue : simpleEvalue , detail : convertedEvalue } } } ) ;
196196 } else {
197197 if ( output . output_type === 'stream' ) {
198- result = String ( output . text [ 0 ] ) ;
198+ result = String ( output . text . join ( '\n' ) ) ;
199199 type = 'text' ;
200200 msg = {
201201 content : {
@@ -265,12 +265,12 @@ define([
265265 var message = content . text ;
266266 resolve ( {
267267 result : message ,
268- type : type ,
268+ type : 'text' ,
269269 msg : {
270270 content : {
271- name : type ,
271+ name : 'text' ,
272272 data : {
273- [ type ] : message
273+ 'text' : message
274274 }
275275 }
276276 }
@@ -315,13 +315,13 @@ define([
315315 if ( msg . content . data [ 'image/png' ] ) {
316316 result = String ( msg . content . data [ 'image/png' ] ) ;
317317 type = 'image/png' ;
318- } else if ( msg . content . data [ 'text/plain' ] ) {
319- result = String ( msg . content . data [ 'text/plain' ] ) ;
320- type = 'text/plain' ;
321318 } else if ( msg . content . data [ 'text/html' ] ) {
322319 result = String ( msg . content . data [ 'text/html' ] ) ;
323320 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+ }
325325 }
326326 resolve ( { result : result , type : type , msg : msg } ) ;
327327 } catch ( ex ) {
@@ -342,13 +342,13 @@ define([
342342 if ( msg . content . data [ 'image/png' ] ) {
343343 result = String ( msg . content . data [ 'image/png' ] ) ;
344344 type = 'image/png' ;
345- } else if ( msg . content . data [ 'text/plain' ] ) {
346- result = String ( msg . content . data [ 'text/plain' ] ) ;
347- type = 'text/plain' ;
348345 } else if ( msg . content . data [ 'text/html' ] ) {
349346 result = String ( msg . content . data [ 'text/html' ] ) ;
350347 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+ }
352352 }
353353 resolve ( { result : result , type : type , msg : msg } ) ;
354354 } catch ( ex ) {
0 commit comments