mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
Generate RST anchors for methods, signals, and properties
Don't rely on the titles.
This commit is contained in:
parent
5f33ae8901
commit
5f8af01b8b
@ -120,12 +120,12 @@ class RstCodeGenerator:
|
||||
def _generate_section(self, title, name):
|
||||
"""Generates a section with the given title."""
|
||||
res = [
|
||||
f".. _{name} {title}:",
|
||||
"",
|
||||
"-" * len(title),
|
||||
title,
|
||||
"-" * len(title),
|
||||
"",
|
||||
f".. {name} {title}:",
|
||||
"",
|
||||
"",
|
||||
]
|
||||
return "\n".join(res)
|
||||
@ -142,6 +142,8 @@ class RstCodeGenerator:
|
||||
else:
|
||||
access = "readable"
|
||||
res += [
|
||||
".. _{title}:",
|
||||
"",
|
||||
title,
|
||||
"^" * len(title),
|
||||
"",
|
||||
@ -216,6 +218,8 @@ class RstCodeGenerator:
|
||||
for m in iface.methods:
|
||||
title = f"{iface.name}.{m.name}"
|
||||
res += [
|
||||
".. _{title}:",
|
||||
"",
|
||||
title,
|
||||
"^" * len(title),
|
||||
"",
|
||||
@ -292,6 +296,8 @@ class RstCodeGenerator:
|
||||
for s in iface.signals:
|
||||
title = f"{iface.name}::{s.name}"
|
||||
res += [
|
||||
".. _{title}:",
|
||||
"",
|
||||
title,
|
||||
"^" * len(title),
|
||||
"",
|
||||
|
Loading…
Reference in New Issue
Block a user