We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32e29bd commit 7b8560cCopy full SHA for 7b8560c
src/pulp_docs/utils/aggregation.py
@@ -45,13 +45,17 @@ def _get_tree(_path):
45
filename = str(Path(entry.path).relative_to(self.tmpdir))
46
children.append(filename)
47
elif entry.is_dir():
48
- sub_section = {entry.name.title(): _get_tree(entry)}
+ dir_title = self.normalize_title(entry.name)
49
+ sub_section = {dir_title: _get_tree(entry)}
50
children.append(sub_section)
51
return children
52
53
result = _get_tree(basepath)
54
return result
55
56
+ def normalize_title(self, raw_title: str):
57
+ return raw_title.replace("_", " ").title()
58
+
59
def repo_grouping(
60
self,
61
template_str: str,
0 commit comments