summaryrefslogtreecommitdiff
path: root/giscanner/mallardwriter.py
diff options
context:
space:
mode:
Diffstat (limited to 'giscanner/mallardwriter.py')
-rw-r--r--giscanner/mallardwriter.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/giscanner/mallardwriter.py b/giscanner/mallardwriter.py
index b79460ed..9ae7aa5a 100644
--- a/giscanner/mallardwriter.py
+++ b/giscanner/mallardwriter.py
@@ -63,7 +63,11 @@ class MallardFormatter(object):
result += self.escape(para[:pos])
rest = para[pos + 1:]
link = re.split('[^a-zA-Z_:-]', rest, maxsplit=1)[0]
- xref = link #self.writer._xrefs.get(link, link)
+ if link in self._namespace.ctypes:
+ type_ = self._namespace.get_by_ctype(link)
+ xref = '%s.%s' % (self._namespace.name, type_.name)
+ else:
+ xref = link
result += '<link xref="%s">%s</link>' % (xref, link)
if len(link) < len(rest):
result += self.format_inline(rest[len(link):])