From: Vladimír Vondruš Date: Wed, 6 Dec 2017 22:47:29 +0000 (+0100) Subject: doxygen: make the

stripper work with empty content. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=209adad969d12fb5e8ceab8929577eed5242f409;p=blog.git doxygen: make the

stripper work with empty content. --- diff --git a/doxygen/dox2html5.py b/doxygen/dox2html5.py index 6f594258..126d57bb 100755 --- a/doxygen/dox2html5.py +++ b/doxygen/dox2html5.py @@ -628,7 +628,7 @@ def parse_desc_internal(state: State, element: ET.Element, immediate_parent: ET. # Strip superfluous

for simple elments (list items, parameter and # return value description, table cells), but only if there is just a # single paragraph - elif (element.tag in ['listitem', 'parameterdescription', 'entry'] or (element.tag == 'simplesect' and element.attrib['kind'] == 'return')) and not has_block_elements and paragraph_count == 1: + elif (element.tag in ['listitem', 'parameterdescription', 'entry'] or (element.tag == 'simplesect' and element.attrib['kind'] == 'return')) and not has_block_elements and paragraph_count == 1 and out.parsed: assert out.parsed.startswith('

') and out.parsed.endswith('

') out.parsed = out.parsed[3:-4]