We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1bb7d91 commit 00add47Copy full SHA for 00add47
jupyter_sphinx/execute.py
@@ -152,6 +152,17 @@ def apply(self):
152
kernel_name = default_kernel
153
file_name = next(default_names)
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
+
166
# Add empty placeholder cells for non-executed nodes so nodes
167
# and cells can be zipped and the provided input/output
168
# can be inserted later
0 commit comments