diff --git a/templates/basichtml.tpl b/templates/basichtml.tpl index bf2a6ca..693901e 100644 --- a/templates/basichtml.tpl +++ b/templates/basichtml.tpl @@ -72,32 +72,36 @@ unknown type {{cell.type}} {%- endblock pyout %} -{% block stream -%} +{% block stream_stdout -%}
{{output.text |ansi2html}}
-{%- endblock stream %} +{%- endblock stream_stdout %} + +{% block stream_stderr -%} +
+
{{output.text |ansi2html}}
+
+{%- endblock stream_stderr %} {% block data_svg -%} {{output.svg}} - {%- endblock data_svg %} -{% block data_html %} +{% block data_html -%} +
{{output.html}}
{%- endblock data_html %} {% block data_png %} - {%- endblock data_png %} {% block data_jpg %} - {%- endblock data_jpg %} @@ -119,3 +123,10 @@ unknown type {{cell.type}} {%- block data_text %}
{{output.text | ansi2html}}
{%- endblock -%} + + +{%- block display_data scoped -%} +
+{{super()}} +
+{%- endblock display_data -%} diff --git a/templates/null.tpl b/templates/null.tpl index 1a63fba..388debe 100644 --- a/templates/null.tpl +++ b/templates/null.tpl @@ -41,7 +41,15 @@ consider calling super even if block is leave block, we might insert more block {%- if output.output_type in ['pyout'] -%} {%- block pyout scoped -%}{%- endblock pyout -%} {%- elif output.output_type in ['stream'] -%} - {%- block stream scoped -%}{%- endblock stream -%} + {%- block stream scoped -%} + {%- if output.stream in ['stdout'] -%} + {%- block stream_stdout scoped -%} + {%- endblock stream_stdout -%} + {%- elif output.stream in ['stderr'] -%} + {%- block stream_stderr scoped -%} + {%- endblock stream_stderr -%} + {%- endif -%} + {%- endblock stream -%} {%- elif output.output_type in ['display_data'] -%} {%- block display_data scoped -%} {%- block data_priority scoped -%}