                 process_collected_mesg_stdout()
                 line++
             input_lines_process(final = true)
+            # combine all html snippets to one html block
+            @_html = (h for h in @_html).join('\n')
+            _html = @_html
             cb()
 
         sagews_data = (cb) =>

                        data_url = scene.static_image
                        out ?= ''
                        out += "<div class='output sage3d'><img src='#{data_url}'></div>"
                else
                    # console.log 'msg.file', mark, mesg
                    if not @_output_ids[mark.id] # avoid duplicated outputs


    html_process_output_mesg: (mesg, mark) ->
        out = null
        # console.log 'html_process_output_mesg', mesg, mark
        if mesg.stdout?
            # assertion: for stdout, `mark` might be undefined
            out = "<div class='output stdout'>#{mesg.stdout}</div>"
