Skip to content

Commit 3504dc4

Browse files
authored
[Fix](CI) ignore markdown file suffix changes in deadlink check (apache#1447)
## Versions - [ ] dev - [ ] 3.0 - [ ] 2.1 - [ ] 2.0 ## Languages - [ ] Chinese - [ ] English ## Docs Checklist - [ ] Checked by AI - [ ] Test Cases Built
1 parent 0380821 commit 3504dc4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

check_move.py

+7
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ def process_md_file(file_path):
5656
full_path += ".md"
5757

5858
for [from_path, to_path] in move_pairs:
59+
from_base, from_ext = os.path.splitext(from_path)
60+
to_base, to_ext = os.path.splitext(to_path)
61+
if (from_ext in [".md", ".mdx"] and to_ext in [".md", ".mdx"]) and (
62+
from_base == to_base
63+
):
64+
continue
65+
5966
# In md, the link relative path starts from the directory where the document is located, not the document
6067
relative_to_path = os.path.relpath(
6168
to_path, os.path.dirname(file_path)

0 commit comments

Comments
 (0)