From bd547e5da0b4ba6904b73d03aa4c36dd8e26eb78 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 29 Jan 2018 23:23:35 +0100 Subject: [PATCH] doxygen: don't be so strict about directory parents. There can be quite a mess. --- doxygen/dox2html5.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 -- 2.30.2