File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -791,6 +791,17 @@ def depart_container_html(self, node):
791
791
self .depart_container (node )
792
792
self .body .append (node .depart_html ())
793
793
794
+ def visit_thebe_source (self , node ):
795
+ if node ['hide_code' ]:
796
+ raise docutils .nodes .SkipNode
797
+ else :
798
+ self .visit_container (node )
799
+
800
+ render_thebe_source = (
801
+ visit_thebe_source ,
802
+ lambda self , node : self .depart_container (node )
803
+ )
804
+
794
805
app .add_node (
795
806
JupyterWidgetViewNode ,
796
807
html = (visit_widget_html , None ),
@@ -813,10 +824,10 @@ def depart_container_html(self, node):
813
824
app .add_node (
814
825
ThebeSourceNode ,
815
826
html = (visit_widget_html , None ),
816
- latex = render_container ,
817
- textinfo = render_container ,
818
- text = render_container ,
819
- man = render_container ,
827
+ latex = render_thebe_source ,
828
+ textinfo = render_thebe_source ,
829
+ text = render_thebe_source ,
830
+ man = render_thebe_source ,
820
831
)
821
832
822
833
app .add_node (
You can’t perform that action at this time.
0 commit comments