summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/_ext/px_xlator.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/_ext/px_xlator.py b/doc/_ext/px_xlator.py
index 00cc854e..f4ddc101 100644
--- a/doc/_ext/px_xlator.py
+++ b/doc/_ext/px_xlator.py
@@ -29,6 +29,10 @@ class PxTranslator(BaseHtmlXlator):
if self.section_level == 1:
raise nodes.SkipNode
else:
+ # The id for the h2 tag is on the parent, move it
+ # down here so we'll get the right HTML.
+ if not node['ids'] and len(node.parent['ids']) > 1:
+ node['ids'] = [node.parent['ids'][1]]
BaseHtmlXlator.visit_title(self, node)
def visit_field_list(self, node):