From fb05caf973d8248016a985bc03bc0c1b72063cdd 2013-02-13 19:30:03 From: Matthias BUSSONNIER Date: 2013-02-13 19:30:03 Subject: [PATCH] ensure base templates returns 0 length file as they should --- diff --git a/templates/null.tpl b/templates/null.tpl index ba89138..5f62daf 100644 --- a/templates/null.tpl +++ b/templates/null.tpl @@ -10,46 +10,46 @@ Subtemplates can Override Blocks to define their custom reresentation. If one of the block you do overrite is nt a leave block, consider calling super. -{% block nonLeaveBlock %} +{%- block nonLeaveBlock -%} #add stuff at beginning {{ super() }} #add stuff at end -{% endblock nonLeaveBlock %} +{%- endblock nonLeaveBlock -%} consider calling super even if block is leave block, we might insert more block later. #} -{% block codecell scoped %} -{% block in_prompt %}{% endblock in_prompt %} -{% block input %}{% endblock input %} -{% if cell.outputs %} -{% block output_prompt %}{% endblock output_prompt %} +{%- block codecell scoped -%} +{%- block in_prompt -%}{%- endblock in_prompt -%} +{%- block input -%}{%- endblock input -%} +{%- if cell.outputs -%} +{%- block output_prompt -%}{%- endblock output_prompt -%} {%- for output in cell.outputs -%} {%- if output.output_type in ['pyout']%} - {% block pyout scoped %}{% endblock pyout %} - {%- elif output.output_type in ['stream'] %} - {% block stream scoped %}{% endblock stream %} - {%- elif output.output_type in ['display_data'] %} - {% block display_data scoped %}{% endblock display_data %} - {%- elif output.output_type in ['pyerr'] %} - {% block pyerr scoped %} - {%- for line in output.traceback %} - {% block traceback_line scoped %}{% endblock traceback_line %} - {%- endfor %} - {% endblock pyerr %} - {%- endif %} + {%- block pyout scoped -%}{%- endblock pyout -%} + {%- elif output.output_type in ['stream'] -%} + {%- block stream scoped -%}{%- endblock stream -%} + {%- elif output.output_type in ['display_data'] -%} + {%- block display_data scoped -%}{%- endblock display_data -%} + {%- elif output.output_type in ['pyerr'] -%} + {%- block pyerr scoped -%} + {%- for line in output.traceback -%} + {%- block traceback_line scoped -%}{%- endblock traceback_line -%} + {%- endfor -%} + {%- endblock pyerr -%} + {%- endif -%} {%- endfor -%} -{% endif -%} -{%- endblock codecell %} +{%- endif -%} +{%- endblock codecell -%} -{% block markdowncell scoped %}{% endblock markdowncell %} +{%- block markdowncell scoped -%}{%- endblock markdowncell -%} -{% block headingcell scoped %} -{% endblock headingcell %} +{%- block headingcell scoped -%} +{%- endblock headingcell -%} -{% block rawcell scoped %} -{% endblock rawcell %} +{%- block rawcell scoped -%} +{%- endblock rawcell -%} -{% block unknowncell scoped %} -{% endblock unknowncell %} +{%- block unknowncell scoped -%} +{%- endblock unknowncell -%}