Skip to content

Commit c795817

Browse files
committed
Generated documentation uses links without index.html
1 parent 76793c0 commit c795817

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tools/documentation/scripts/content_modifiers/link_modifier.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,18 @@ def _apply_modification(line: str, file_path: str) -> str:
3535
continue
3636

3737
if link.endswith("/") or link.endswith("/."):
38-
new_link = link.rstrip(".") + "index.html"
38+
new_link = link.rstrip(".")
3939
line = line.replace(link, new_link)
4040
link = new_link
4141

42-
if link == "." or link == ".." or link == "./index.html":
42+
if link == "." or link == ".." or link == "./":
4343
absolute_prefix = _getMissingAbsolutePath(link, file_path_fixed)
44-
new_link = absolute_prefix + "index.html"
44+
new_link = absolute_prefix
4545
line = line.replace(link, new_link)
4646

4747
if link.startswith("../"):
4848
absolute_prefix = _getMissingAbsolutePath(link, file_path_fixed)
4949
new_link = absolute_prefix + link.replace("../", "").replace("..", "")
50-
new_link = new_link + ("index.html" if new_link.endswith("/") else "")
5150
line = line.replace(link, new_link)
5251

5352
return line

0 commit comments

Comments
 (0)