From 5c346ed93e670069d1412781405a1bd503605617 2013-02-13 19:30:02 From: Matthias BUSSONNIER Date: 2013-02-13 19:30:02 Subject: [PATCH] add any-cell block --- diff --git a/templates/basic.tpl b/templates/basic.tpl index 294aed2..613c756 100644 --- a/templates/basic.tpl +++ b/templates/basic.tpl @@ -2,22 +2,24 @@ {%- endblock header -%} {%- block body -%} {%- for cell in cells -%} - {%- if cell.type in ['code'] -%} - {%- block codecell scoped-%} - {%- endblock codecell-%} - {%- elif cell.type in ['markdown'] -%} - {%- block markdowncell scoped-%} - {%- endblock markdowncell -%} - {%- elif cell.type in ['heading'] -%} - {%- block headingcell scoped-%} - {%- endblock headingcell -%} - {%- elif cell.type in ['raw'] -%} - {%- block rawcell scoped-%} - {%- endblock rawcell -%} - {%- else -%} - {%- block unknowncell scoped-%} - {%- endblock unknowncell -%} - {%- endif -%} + {%- block any_cell scoped -%} + {%- if cell.type in ['code'] -%} + {%- block codecell scoped-%} + {%- endblock codecell-%} + {%- elif cell.type in ['markdown'] -%} + {%- block markdowncell scoped-%} + {%- endblock markdowncell -%} + {%- elif cell.type in ['heading'] -%} + {%- block headingcell scoped-%} + {%- endblock headingcell -%} + {%- elif cell.type in ['raw'] -%} + {%- block rawcell scoped-%} + {%- endblock rawcell -%} + {%- else -%} + {%- block unknowncell scoped-%} + {%- endblock unknowncell -%} + {%- endif -%} + {%- endblock any_cell -%} {%- endfor -%} {%- endblock body -%} diff --git a/templates/python-armor.tpl b/templates/python-armor.tpl index 2015cf9..018af6f 100644 --- a/templates/python-armor.tpl +++ b/templates/python-armor.tpl @@ -1,10 +1,9 @@ {%- extends 'python.tpl' -%} -{% block codecell %} +{% block any_cell %} ============================== -=======start codecell========= +=======start {{cell.type}}========= {{ super() }} -======= end codecell ========= -============================== -{% endblock codecell %} +======= end {{cell.type}} ========= +=============================={% endblock any_cell %}