From: Vladimír Vondruš Date: Mon, 29 Jan 2018 22:23:35 +0000 (+0100) Subject: doxygen: don't be so strict about directory parents. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=bd547e5da0b4ba6904b73d03aa4c36dd8e26eb78;p=blog.git doxygen: don't be so strict about directory parents. There can be quite a mess. --- diff --git a/doxygen/dox2html5.py b/doxygen/dox2html5.py index b7d2a829..045c5a86 100755 --- a/doxygen/dox2html5.py +++ b/doxygen/dox2html5.py @@ -1258,8 +1258,11 @@ def postprocess_state(state: State): # Strip parent dir from dir name elif compound.kind == 'dir': prefix = state.compounds[compound.parent].name + '/' - assert compound.name.startswith(prefix) - compound.leaf_name = compound.name[len(prefix):] + if compound.name.startswith(prefix): + compound.leaf_name = compound.name[len(prefix):] + else: # pragma: no cover + logging.warning("{}: potential issue: directory {} parent is not a prefix: {}".format(state.current, compound.name, prefix)) + compound.leaf_name = compound.name # Other compounds are not in any index pages or breadcrumb, so leaf # name not needed