File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -152,6 +152,17 @@ def apply(self):
152
152
kernel_name = default_kernel
153
153
file_name = next (default_names )
154
154
155
+ # Save time when jupyter notebook execution is not necessary
156
+ if not any (not "execute" in node or node ["execute" ] for node in nodes ):
157
+ # mimics empty cell output for each node
158
+ for node in nodes :
159
+ source = node .children [0 ]
160
+ source .attributes ["classes" ].append ("code_cell" )
161
+ node .attributes ["cm_language" ] = kernel_name
162
+ node += CellOutputNode (classes = ["cell_output" ])
163
+ apply_styling (node , thebe_config )
164
+ continue
165
+
155
166
# Add empty placeholder cells for non-executed nodes so nodes
156
167
# and cells can be zipped and the provided input/output
157
168
# can be inserted later
You can’t perform that action at this time.
0 commit comments