[gobject-introspection: 14/30] devdocs: Match DevDocs' slug names
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection: 14/30] devdocs: Match DevDocs' slug names
- Date: Tue, 14 Aug 2018 07:05:10 +0000 (UTC)
commit 9e31e0618171f4a3683281706e167759365db1f3
Author: Philip Chimento <philip chimento gmail com>
Date: Sat Dec 12 16:12:41 2015 -0800
devdocs: Match DevDocs' slug names
Because of some Ruby naming rules in DevDocs, other GIR modules will have
their documentation in ../namespace10/ instead of ../NameSpace-1.0/, so
change format_external_xref() to match this.
giscanner/docwriter.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/giscanner/docwriter.py b/giscanner/docwriter.py
index a0052d87..f5389cd9 100644
--- a/giscanner/docwriter.py
+++ b/giscanner/docwriter.py
@@ -1162,12 +1162,13 @@ class DevDocsFormatterGjs(DocFormatterGjs):
def format_external_xref(self, node, attrdict, pluralize=False):
ns = node.namespace
+ slug = ns.name.lower() + str(ns.version).replace('.', '')
if not self.should_render_node(node):
- target = '../%s-%s/%s' % (ns.name, str(ns.version), make_page_id(node.parent))
+ target = '../%s/%s' % (slug, make_page_id(node.parent))
return self._write_xref_markdown(target, self.make_anchor(node),
self.format_page_name(node.parent),
pluralize=pluralize)
- target = '../%s-%s/%s' % (ns.name, str(ns.version), make_page_id(node))
+ target = '../%s/%s' % (slug, make_page_id(node))
return self._write_xref_markdown(target, None,
self.format_page_name(node),
pluralize=pluralize)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]