Merge branch 'ebassi/rst-codegen-short-title' into 'main'

Shorten the title for D-Bus interface docs

See merge request GNOME/glib!3793
This commit is contained in:
Philip Withnall 2023-12-31 09:08:20 +00:00
commit fc3aad1661
2 changed files with 4 additions and 3 deletions

View File

@ -88,7 +88,7 @@ class MdCodeGenerator:
f"Title: {iface.name} D-Bus Interface",
f"Slug: {iface.name}",
"",
"# " + iface.name,
"# " + iface.name_without_prefix,
"",
"## Description",
"",

View File

@ -82,12 +82,13 @@ class RstCodeGenerator:
def _generate_header(self, iface):
"""Generates the header and preamble of the document."""
header_len = len(iface.name)
iface_name = iface.name_without_prefix
header_len = len(iface_name)
res = [
f".. _{iface.name}:",
"",
"=" * header_len,
iface.name,
iface_name,
"=" * header_len,
"",
"-----------",