aboutsummaryrefslogtreecommitdiffstats
path: root/lv2specgen
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-02-19 02:46:57 +0000
committerDavid Robillard <d@drobilla.net>2012-02-19 02:46:57 +0000
commita085d55c5b45ebfa126511aaec0aa307b0893e53 (patch)
treed4c13b0492699c1043790ff9a5a6c6c68bf3a47d /lv2specgen
parent7fce157bc3940f997e9ac8566c55021b9af43b0a (diff)
downloadlv2-a085d55c5b45ebfa126511aaec0aa307b0893e53.tar.xz
Fix dangling commas in Properties and Instances index.
Diffstat (limited to 'lv2specgen')
-rwxr-xr-xlv2specgen/lv2specgen.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/lv2specgen/lv2specgen.py b/lv2specgen/lv2specgen.py
index 0c82027..edef5ea 100755
--- a/lv2specgen/lv2specgen.py
+++ b/lv2specgen/lv2specgen.py
@@ -752,22 +752,24 @@ def buildIndex(m, classlist, proplist, instalist=None):
if (len(proplist) > 0):
azlist += "<dt>Properties</dt><dd>"
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]
- azlist = """%s <a href="#%s">%s</a>, """ % (azlist, name, name)
- azlist = """%s</dd>\n""" % azlist
+ props += ['<a href="#%s">%s</a>' % (name, name)]
+ azlist += ', '.join(props) + '</dd>\n'
if (instalist != None and len(instalist) > 0):
azlist += "<dt>Instances</dt><dd>"
+ instas = []
for i in instalist:
p = getShortName(i)
anchor = getAnchor(i)
- azlist = """%s <a href="#%s">%s</a>, """ % (azlist, anchor, p)
- azlist = """%s</dd>\n""" % azlist
+ instas += ['<a href="#%s">%s</a>' % (anchor, p)]
+ azlist += ', '.join(instas) + '</dd>\n'
- azlist = """%s\n</dl>""" % azlist
+ azlist += '\n</dl>'
return azlist