mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #6213: ifconfig: contents after headings are not shown
This commit is contained in:
parent
b9153ef027
commit
338941a49a
1
CHANGES
1
CHANGES
@ -63,6 +63,7 @@ Bugs fixed
|
||||
|
||||
* #6230: Inappropriate node_id has been generated by glossary directive if term
|
||||
is consisted by non-ASCII characters
|
||||
* #6213: ifconfig: contents after headings are not shown
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
@ -8,6 +8,11 @@
|
||||
|
||||
This extension is quite simple, and features only one directive:
|
||||
|
||||
.. warning::
|
||||
|
||||
This directive is designed to control only content of document. It could
|
||||
not control sections, labels and so on.
|
||||
|
||||
.. rst:directive:: ifconfig
|
||||
|
||||
Include content of the directive only if the Python expression given as an
|
||||
|
@ -23,6 +23,7 @@ from docutils import nodes
|
||||
|
||||
import sphinx
|
||||
from sphinx.util.docutils import SphinxDirective
|
||||
from sphinx.util.nodes import nested_parse_with_titles
|
||||
|
||||
if False:
|
||||
# For type annotation
|
||||
@ -48,8 +49,7 @@ class IfConfig(SphinxDirective):
|
||||
node.document = self.state.document
|
||||
self.set_source_info(node)
|
||||
node['expr'] = self.arguments[0]
|
||||
self.state.nested_parse(self.content, self.content_offset,
|
||||
node, match_titles=True)
|
||||
nested_parse_with_titles(self.state, self.content, node)
|
||||
return [node]
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user