diff options
author | Tomeu Vizoso <tomeu.vizoso@collabora.com> | 2012-02-20 14:20:22 +0100 |
---|---|---|
committer | Tomeu Vizoso <tomeu.vizoso@collabora.com> | 2012-02-20 14:20:22 +0100 |
commit | 3c1bb2b27583d6296a83a84bb4c5a335c268671b (patch) | |
tree | 0527ae76b0ba5b15fb37faffd02e589110162b0f /giscanner | |
parent | 97484085494e8ec84f64d9b3e193c7a67d1051d2 (diff) | |
download | gobject-introspection-3c1bb2b27583d6296a83a84bb4c5a335c268671b.tar.gz |
g-ir-doc-tool: Properly link to property pages
Diffstat (limited to 'giscanner')
-rw-r--r-- | giscanner/mallardwriter.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/giscanner/mallardwriter.py b/giscanner/mallardwriter.py index 23a14a71..65123a88 100644 --- a/giscanner/mallardwriter.py +++ b/giscanner/mallardwriter.py @@ -64,6 +64,8 @@ class MallardFormatter(object): result += self.escape(para[:pos]) rest = para[pos + 1:] link = re.split('[^a-zA-Z_:-]', rest, maxsplit=1)[0] + if link.endswith(':'): + link = link[:-1] if '::' in link: type_name, signal_name = link.split('::') if type_name in self._namespace.ctypes: @@ -73,6 +75,15 @@ class MallardFormatter(object): else: xref = link xref_name = link + elif ':' in link: + type_name, property_name = link.split(':') + if type_name in self._namespace.ctypes: + type_ = self._namespace.get_by_ctype(type_name) + xref = '%s.%s-%s' % (self._namespace.name, type_.name, property_name) + xref_name = '%s.%s:%s' % (self._namespace.name, type_.name, property_name) + else: + xref = link + xref_name = link elif link in self._namespace.ctypes: type_ = self._namespace.get_by_ctype(link) xref = '%s.%s' % (self._namespace.name, type_.name) |