From 916c626a4e17f356eaa5b73b9e67aaaab310e212 Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Sat, 12 Dec 2015 16:14:07 -0800 Subject: 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:///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. --- giscanner/docwriter.py | 4 ++-- 1 file 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) -- cgit v1.2.1