From 3b3a6ccecde12f8a7242bf4427e9e38de74dcd98 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Tue, 26 Mar 2024 01:48:32 -0400 Subject: [PATCH] Docs: Python: Use headings instead of rubrics This allows these headings to show under "On this page". --- doc/python_api/sphinx_doc_gen.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index 85142258280..bc0fbc15e41 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -1712,7 +1712,7 @@ def pyrna2sphinx(basepath): lines.append(" * :class:`%s.%s`\n" % (base.identifier, identifier)) if lines: - fw(".. rubric:: Inherited Properties\n\n") + fw(title_string("Inherited Properties", "-")) fw(".. hlist::\n") fw(" :columns: 2\n\n") @@ -1738,7 +1738,7 @@ def pyrna2sphinx(basepath): lines.append(" * :class:`%s.%s`\n" % (base.identifier, identifier)) if lines: - fw(".. rubric:: Inherited Functions\n\n") + fw(title_string("Inherited Functions", "-")) fw(".. hlist::\n") fw(" :columns: 2\n\n") @@ -1750,8 +1750,7 @@ def pyrna2sphinx(basepath): del lines[:] if struct.references: - # use this otherwise it gets in the index for a normal heading. - fw(".. rubric:: References\n\n") + fw(title_string("References", "-")) fw(".. hlist::\n") fw(" :columns: 2\n\n") @@ -2238,7 +2237,6 @@ def write_rst_enum_items(basepath, key, key_no_prefix, enum_items): fw(".. _%s:\n\n" % key) fw(title_string(key_no_prefix.replace("_", " ").title(), "#")) - # fw(".. rubric:: %s\n\n" % key_no_prefix.replace("_", " ").title()) for item in enum_items: identifier = item.identifier