[gobject-introspection: 18/30] devdocs: Fix links to enum members
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection: 18/30] devdocs: Fix links to enum members
- Date: Tue, 14 Aug 2018 07:05:30 +0000 (UTC)
commit d1ca314d0b5f6ad44825514cc1e41917735a31f3
Author: Philip Chimento <philip chimento gmail com>
Date: Sun Dec 13 22:34:34 2015 -0800
devdocs: Fix links to enum members
Links to enum members, e.g. GLib.MyEnum.FOO, were previously formatted as
GLib.MyEnum.foo, so we add this special case for nodes that are
ast.Members.
giscanner/docwriter.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/giscanner/docwriter.py b/giscanner/docwriter.py
index d79b3fc7..e5a025ba 100644
--- a/giscanner/docwriter.py
+++ b/giscanner/docwriter.py
@@ -1155,8 +1155,11 @@ class DevDocsFormatterGjs(DocFormatterGjs):
if not self.should_render_node(node):
# Non-toplevel nodes are linked to the main page.
page = make_page_id(node.parent)
+ name = node.name
+ if isinstance(node, ast.Member):
+ name = name.upper()
return self._write_xref_markdown(page, self.make_anchor(node),
- page + "." + node.name,
+ page + "." + name,
pluralize=pluralize)
return self._write_xref_markdown(make_page_id(node), pluralize=pluralize)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]