Skip to content

Commit

Permalink
doc/conf.py: Replace all titles
Browse files Browse the repository at this point in the history
This fixes titles like "[Race Description]".

Link: https://lore.kernel.org/ltp/[email protected]/
Fixes: 1bf344a ("doc: add tests catalog page")
Acked-by: Andrea Cervesato <[email protected]>
Signed-off-by: Petr Vorel <[email protected]>
  • Loading branch information
pevik committed Feb 19, 2025
1 parent 11ee12a commit ae69b1d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ def generate_test_catalog(_):
metadata = json.load(data)

timeout_def = metadata['defaults']['timeout']
regexp = re.compile(r'^\[([A-Za-z][\w\W]+)\]')

for test_name, conf in sorted(metadata['tests'].items()):
text.extend([
Expand All @@ -455,12 +456,8 @@ def generate_test_catalog(_):
if desc:
desc_text = []
for line in desc:
if line.startswith("[Description]"):
desc_text.append("**Description**")
elif line.startswith("[Algorithm]"):
desc_text.append("**Algorithm**")
else:
desc_text.append(line)
line = regexp.sub(r'**\1**', line)
desc_text.append(line)

text.extend([
'\n'.join(desc_text),
Expand Down
2 changes: 1 addition & 1 deletion tools/kirk

0 comments on commit ae69b1d

Please sign in to comment.