File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -954,7 +954,7 @@ class SagecodeTransform(SphinxTransform):
954954
955955 def apply (self ):
956956 if self .app .builder .tags .has ('html' ) or self .app .builder .tags .has ('inventory' ):
957- for node in self .document .findall (nodes .literal_block ):
957+ for node in list ( self .document .findall (nodes .literal_block ) ):
958958 if node .get ('language' ) is None and node .astext ().startswith ('sage:' ):
959959 from docutils .nodes import container as Container , label as Label , literal_block as LiteralBlock , Text
960960 from sphinx_inline_tabs ._impl import TabContainer
@@ -963,7 +963,8 @@ def apply(self):
963963 prev_node = node .previous_sibling ()
964964 if isinstance (node .previous_sibling (), TabContainer ):
965965 # Make sure not to merge inline tabs for adjacent literal blocks
966- parent .insert (index , Text ('' ))
966+ parent .insert (index , nodes .paragraph ())
967+ prev_node = parent [index ]
967968 index += 1
968969 parent .remove (node )
969970 # Tab for Sage code
@@ -1102,3 +1103,4 @@ def feature_tags():
11021103 for feature in all_features ():
11031104 if feature .is_present ():
11041105 yield 'feature_' + feature .name .replace ('.' , '_' )
1106+
You can’t perform that action at this time.
0 commit comments