Skip to content

Commit a5e5ca9

Browse files
committed
Fix mmeng-4362: re-sort the indexing page items
1 parent 23b1026 commit a5e5ca9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

charon/pkgs/indexing.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ def __to_html_content(package_type: str, contents: List[str], folder: str) -> st
174174
items = temp_items
175175
else:
176176
items.extend(contents)
177-
items_set = set(__sort_index_items(items))
178-
index = IndexedHTML(title=folder, header=folder, items=items_set)
177+
items_result = list(filter(lambda c: c.strip(), __sort_index_items(set(items))))
178+
index = IndexedHTML(title=folder, header=folder, items=items_result)
179179
return index.generate_index_file_content(package_type)
180180

181181

@@ -303,8 +303,8 @@ def re_index(
303303
real_contents.append(c)
304304
else:
305305
real_contents = contents
306-
logger.debug(real_contents)
307306
index_content = __to_html_content(package_type, real_contents, path)
307+
logger.debug("The re-indexed page content: %s", index_content)
308308
if not dry_run:
309309
index_path = os.path.join(path, "index.html")
310310
if path == "/":

0 commit comments

Comments
 (0)