mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Add a meta node to fix iteration
This commit is contained in:
parent
113e1d8759
commit
bc6571a67b
@ -20,6 +20,7 @@ from docutils import nodes
|
||||
from docutils.nodes import Node
|
||||
|
||||
import sphinx
|
||||
from sphinx import addnodes
|
||||
from sphinx.application import Sphinx
|
||||
from sphinx.util.docutils import SphinxDirective
|
||||
from sphinx.util.nodes import nested_parse_with_titles
|
||||
@ -64,7 +65,7 @@ def process_ifconfig_nodes(app: Sphinx, doctree: nodes.document, docname: str) -
|
||||
node.replace_self(newnode)
|
||||
else:
|
||||
if not res:
|
||||
node.replace_self([])
|
||||
node.replace_self(addnodes.meta())
|
||||
else:
|
||||
node.replace_self(node.children)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user