summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2015-12-12 16:14:07 -0800
committerrockon999 <rockon999@users.noreply.github.com>2018-08-06 02:53:45 -0500
commit916c626a4e17f356eaa5b73b9e67aaaab310e212 (patch)
tree75a4fa9d896238ac6a3743692c3af2a523973b12
parent9e31e0618171f4a3683281706e167759365db1f3 (diff)
downloadgobject-introspection-916c626a4e17f356eaa5b73b9e67aaaab310e212.tar.gz
devdocs: Mark links to other GIRs as such
DevDocs will try to normalize links relative to the current documentation if it can, and strips ../ off the front, so e.g. a link on the gio20/gio.file page to ../gobject20/gobject.object will end up resolving to http://<host>/gio20/gobject20/gobject.object, which doesn't exist. We clearly mark links to other GIRs with a gir:// URL scheme that DevDocs won't process automatically, and then fill in the links ourselves in the DevDocs scraper.
-rw-r--r--giscanner/docwriter.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/giscanner/docwriter.py b/giscanner/docwriter.py
index f5389cd9..d79b3fc7 100644
--- a/giscanner/docwriter.py
+++ b/giscanner/docwriter.py
@@ -1164,11 +1164,11 @@ class DevDocsFormatterGjs(DocFormatterGjs):
ns = node.namespace
slug = ns.name.lower() + str(ns.version).replace('.', '')
if not self.should_render_node(node):
- target = '../%s/%s' % (slug, make_page_id(node.parent))
+ target = 'gir:///%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' % (slug, make_page_id(node))
+ target = 'gir:///%s/%s' % (slug, make_page_id(node))
return self._write_xref_markdown(target, None,
self.format_page_name(node),
pluralize=pluralize)