diff options
author | Tomeu Vizoso <tomeu.vizoso@collabora.co.uk> | 2011-08-13 11:58:18 +0200 |
---|---|---|
committer | Tomeu Vizoso <tomeu.vizoso@collabora.co.uk> | 2011-08-13 11:58:55 +0200 |
commit | 299e561b13d63c350aba17b89a358b2ec5cdf027 (patch) | |
tree | 74776dd7ad9caeff4148c7d5df5668a2e55d58f3 /giscanner | |
parent | edc8e981c7b2b396bc05476809e5671c7164d981 (diff) | |
download | gobject-introspection-299e561b13d63c350aba17b89a358b2ec5cdf027.tar.gz |
g-ir-doc-tool: Use same link ids as gtk-doc-mkdb does
Diffstat (limited to 'giscanner')
-rw-r--r-- | giscanner/docbookwriter.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/giscanner/docbookwriter.py b/giscanner/docbookwriter.py index 7ce3d80b..7d6c3b42 100644 --- a/giscanner/docbookwriter.py +++ b/giscanner/docbookwriter.py @@ -145,7 +145,7 @@ class DocBookFormatter(object): if link: self._writer.write_tag("link", [("linkend", - "%s-details" % (method.name))], + method.symbol.replace("_", "-"))], method.symbol) else: self._writer.write_line(method.symbol) @@ -436,14 +436,15 @@ class DocBookWriter(object): def _render_method(self, entity): + link_name = entity.get_ast().symbol.replace("_", "-") + self._writer.push_tag('refsect2', - [('id', entity.get_ast().symbol), - ('role', 'struct')]) + [('id', link_name), + ('role', 'function')]) self._writer.write_tag("title", [], self._formatter.get_method_as_title(entity)) - with self._writer.tagcontext("indexterm", - [("zone", "%s" % entity.get_name())]): + with self._writer.tagcontext("indexterm", [("zone", link_name)]): self._writer.write_tag("primary", [], entity.get_name()) with self._writer.tagcontext("programlisting"): |