From 0913e2b596fb163527aafc70e29c7ad755136006 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 18 Jan 2018 21:20:23 +0100 Subject: [PATCH] doxygen: properly ignore empty/private documentation pages. --- doxygen/dox2html5.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/doxygen/dox2html5.py b/doxygen/dox2html5.py index 5dbf709a..f3d50d4d 100755 --- a/doxygen/dox2html5.py +++ b/doxygen/dox2html5.py @@ -1273,13 +1273,15 @@ def parse_xml(state: State, xml: str): assert compounddef.tag == 'compounddef' assert len([i for i in root]) == 1 - # Ignoring private structs/classes, unnamed namespaces, files and - # directories that have absolute location (i.e., outside of the - # main source tree) + # Ignoring private structs/classes and unnamed namespaces if ((compounddef.attrib['kind'] in ['struct', 'class', 'union'] and compounddef.attrib['prot'] == 'private') or - (compounddef.attrib['kind'] == 'namespace' and '@' in compounddef.find('compoundname').text) or - (compounddef.attrib['kind'] in ['dir', 'file'] and os.path.isabs(compounddef.find('location').attrib['file']))): - logging.debug("only private things in {}, skipping".format(os.path.basename(xml))) + (compounddef.attrib['kind'] == 'namespace' and '@' in compounddef.find('compoundname').text)): + logging.debug("{}: only private things, skipping".format(state.current)) + return None + + # Ignoring dirs/files w/o any description + if compounddef.attrib['kind'] in ['dir', 'file'] and not compounddef.find('briefdescription') and not compounddef.find('detaileddescription'): + logging.debug("{}: file/dir documentation empty, skipping".format(state.current)) return None compound = Empty() -- 2.30.2