##// END OF EJS Templates
Simplification of the logic.
damianavila -
Show More
@@ -13,26 +13,6 b''
13 13 </div>
14 14 {% endblock input_group %}
15 15
16 {% block m_input_group -%}
17 <div class="input">
18 {{ super() }}
19 </div>
20 {% endblock m_input_group %}
21
22 {% block h_input_group -%}
23 <div class="input">
24 {{ super() }}
25 </div>
26 {% endblock h_input_group %}
27
28 {% block r_input_group -%}
29 {{ super() }}
30 {% endblock r_input_group %}
31
32 {% block u_input_group -%}
33 {{ super() }}
34 {% endblock u_input_group %}
35
36 16 {% block output_group %}
37 17 <div class="output_wrapper">
38 18 <div class="output">
@@ -78,31 +58,37 b' In&nbsp;[{{ cell.prompt_number }}]:'
78 58 </div>
79 59 {% endblock output %}
80 60
81 {% block m_input %}
61 {% block markdowncell scoped %}
62 <div class="input">
63 {{ self.e_in_prompt() }}
82 64 <div class="inner_cell">
83 65 <div class="text_cell_render border-box-sizing rendered_html">
84 66 {{ cell.source | markdown2html | strip_files_prefix }}
85 67 </div>
86 68 </div>
87 {%- endblock m_input %}
69 </div>
70 {%- endblock markdowncell %}
88 71
89 {% block h_input %}
72 {% block headingcell scoped %}
73 <div class="input">
74 {{ self.e_in_prompt() }}
90 75 <div class="inner_cell">
91 76 <div class="text_cell_render border-box-sizing rendered_html">
92 77 {{ ("#" * cell.level + cell.source) | replace('\n', ' ') | markdown2html | strip_files_prefix | add_anchor }}
93 78 </div>
94 79 </div>
95 {% endblock h_input %}
80 </div>
81 {% endblock headingcell %}
96 82
97 {% block r_input %}
83 {%- block rawcell scoped -%}
98 84 {% if cell.metadata.get('raw_mimetype', resources.get('raw_mimetype', '')).lower() in resources.get('raw_mimetypes', ['']) %}
99 85 {{ cell.source }}
100 86 {% endif %}
101 {% endblock r_input %}
87 {%- endblock rawcell -%}
102 88
103 {% block u_input %}
89 {% block unknowncell scoped %}
104 90 unknown type {{ cell.type }}
105 {% endblock u_input %}
91 {% endblock unknowncell %}
106 92
107 93 {% block pyout -%}
108 94 <div class="box-flex1 output_subarea output_pyout">
@@ -71,17 +71,9 b' consider calling super even if it is a leave block, we might insert more blocks '
71 71 {%- endblock codecell -%}
72 72 {%- elif cell.cell_type in ['markdown'] -%}
73 73 {%- block markdowncell scoped-%}
74 {%- block m_input_group -%}
75 {%- block e_in_prompt -%}{%- endblock e_in_prompt -%}
76 {%- block m_input -%}{%- endblock m_input -%}
77 {%- endblock m_input_group -%}
78 74 {%- endblock markdowncell -%}
79 75 {%- elif cell.cell_type in ['heading'] -%}
80 76 {%- block headingcell scoped-%}
81 {%- block h_input_group -%}
82 {{ self.e_in_prompt() }}
83 {%- block h_input -%}{%- endblock h_input -%}
84 {%- endblock h_input_group -%}
85 77 {%- endblock headingcell -%}
86 78 {%- elif cell.cell_type in ['raw'] -%}
87 79 {%- block rawcell scoped -%}
@@ -91,10 +83,6 b' consider calling super even if it is a leave block, we might insert more blocks '
91 83 {%- endblock rawcell -%}
92 84 {%- else -%}
93 85 {%- block unknowncell scoped-%}
94 {%- block u_input_group -%}
95 {{ self.e_in_prompt() }}
96 {%- block u_input -%}{%- endblock u_input -%}
97 {%- endblock u_input_group -%}
98 86 {%- endblock unknowncell -%}
99 87 {%- endif -%}
100 88 {%- endblock any_cell -%}
General Comments 0
You need to be logged in to leave comments. Login now