From 5589e0effb20872f0f9588b2b911a1afe819b475 Mon Sep 17 00:00:00 2001 From: Rust1667 <115593284+Rust1667@users.noreply.github.com> Date: Fri, 7 Apr 2023 13:44:03 +0200 Subject: [PATCH] fix script regex it was giving some links with errors in the subsection like these: https://fmhy.pages.dev/storage/#drive-formatting--file_deletion https://fmhy.pages.dev/storage/#ip--dns_leak_tests and a bunch more, not replacing every underscore --- .github/replace-links-to-fmhy-in-files-in-current-dir.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/replace-links-to-fmhy-in-files-in-current-dir.py b/.github/replace-links-to-fmhy-in-files-in-current-dir.py index 84bb3cc66..2955832c0 100644 --- a/.github/replace-links-to-fmhy-in-files-in-current-dir.py +++ b/.github/replace-links-to-fmhy-in-files-in-current-dir.py @@ -74,7 +74,7 @@ def replace_domain_and_page(text): return text def replace_underscore_in_subsections(text): - pattern = r'(/#[\w]+(?:_[\w]+)*)' + pattern = r'(/#[\w\-]+(?:_[\w]+)*)' matches = re.findall(pattern, text) for match in matches: replacement = match.replace('_', '-')