From 7ea2b2bf56cfd5c4c8abfe8674ccda3c7e179132 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 31 Dec 2013 01:01:56 +0000 Subject: lv2specgen: Fix links to externally defined terms. --- lv2specgen/lv2specgen.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'lv2specgen') diff --git a/lv2specgen/lv2specgen.py b/lv2specgen/lv2specgen.py index efbf053..4ea301a 100755 --- a/lv2specgen/lv2specgen.py +++ b/lv2specgen/lv2specgen.py @@ -726,6 +726,13 @@ def buildIndex(m, classlist, proplist, instalist=None): azlist = '
' + def termLink(m, t): + if str(t).startswith(spec_ns_str): + name = termName(m, t) + return '%s' % (name, name) + else: + return '%s' % (str(t), str(t)) + if (len(classlist) > 0): azlist += "
Classes
    " classlist.sort() @@ -744,10 +751,7 @@ def buildIndex(m, classlist, proplist, instalist=None): continue shown[c] = True - name = termName(m, c) - if name.startswith(spec_ns_str): - name = name.split(spec_ns_str[-1])[1] - azlist += '
  • %s' % (name, name) + azlist += '
  • ' + termLink(m, c) def class_tree(c): tree = '' shown[c] = True @@ -758,8 +762,7 @@ def buildIndex(m, classlist, proplist, instalist=None): subclasses.sort() for s in subclasses: - s_name = termName(m, s) - tree += '
  • %s\n' % (s_name, s_name) + tree += '
  • ' + termLink(m, s) tree += class_tree(s) tree += '
  • ' if tree != '': @@ -774,10 +777,7 @@ def buildIndex(m, classlist, proplist, instalist=None): proplist.sort() props = [] for p in proplist: - name = termName(m, p) - if name.startswith(spec_ns_str): - name = name.split(spec_ns_str[-1])[1] - props += ['%s' % (name, name)] + props += [termLink(m, p)] azlist += ', '.join(props) + '
\n' if (instalist != None and len(instalist) > 0): -- cgit v1.2.1