svenevs/exhale

Wrong filenames with underscore folders

chengts95 opened this issue · 2 comments

When parsing the File Hierarchy of folders like "Interface_a" and "Interface_b", the generated library_root.rst only preserve the name after the last underscore.
File inputs:
File inputs
Generated doc:
Generated doc

Thank you for reporting, sorry for the long delay. Offending code:

exhale/exhale/graph.py

Lines 2215 to 2226 in 359fccb

SPECIAL_CASES = ["dir", "file", "namespace"]
if node.kind in SPECIAL_CASES:
if node.kind == "file":
unique_id = node.location
else:
unique_id = node.name
unique_id = unique_id.replace(":", "_").replace(os.sep, "_").replace(" ", "_")
if node.kind == "namespace":
title = node.name.split("::")[-1]
else:
title = os.path.basename(unique_id.replace("_", os.sep))

Need to think about how to fix this one correctly...

Thank you very much!