Skip to content

Commit b214629

Browse files
author
pixelead0
committed
Fix regex pattern for updating broken links in fix_broken_links.py to ensure correct content replacement.
1 parent 580dda1 commit b214629

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

scripts/fix_broken_links.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ def fix_file_links(file_path: str, broken_links: List[Dict]) -> Tuple[bool, List
8989
f'\\[{re.escape(link["text"])}\\]\\({re.escape(old_url)}\\)'
9090
)
9191
replacement = f'[{link["text"]}]({new_url})'
92+
new_content = re.sub(pattern, replacement, content)
9293
elif link_type == "html":
9394
# Fix HTML links: <a href="url">text</a>
9495
# Handle both single and double quotes

0 commit comments

Comments
 (0)