From d923259fae9fb323ec876e2b6ff2701149195236 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 24 Mar 2019 19:10:05 +0100 Subject: Fix invalid HTML when specification index is empty --- lv2specgen/lv2specgen.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'lv2specgen') diff --git a/lv2specgen/lv2specgen.py b/lv2specgen/lv2specgen.py index a6f30db..94af967 100755 --- a/lv2specgen/lv2specgen.py +++ b/lv2specgen/lv2specgen.py @@ -741,8 +741,8 @@ def buildIndex(m, classlist, proplist, instalist=None, filelist=None): if not (classlist or proplist or instalist or filelist): return '' - head = '' - body = '' + head = '' + body = '' def termLink(m, t): if str(t).startswith(spec_ns_str): @@ -819,10 +819,13 @@ def buildIndex(m, classlist, proplist, instalist=None, filelist=None): body += '
  • %s
  • ' % (i, os.path.basename(i)) body += '\n' - head += '' - body += '' - return '%s\n%s
    ' % (head, body) + if head and body: + return ''' +%s +%s
    +''' % (head, body) + return '' def add(where, key, value): if not key in where: -- cgit v1.2.1