]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
scripts/mdlinkcheck: fix the ../ handling in file links
authorDaniel Stenberg <daniel@haxx.se>
Sat, 21 Dec 2024 12:26:56 +0000 (13:26 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 21 Dec 2024 12:57:38 +0000 (13:57 +0100)
Follow-up to 62515e8e9d750f

Closes #15797

.github/workflows/checkdocs.yml
scripts/mdlinkcheck

index e9037a50dad1ca159cbe219bcb89c08983628719..6a8149672d37552c1f9dca09ddf01e0f497359ea 100644 (file)
@@ -14,7 +14,8 @@ name: Docs
       - '*/ci'
     paths:
       - '.github/workflows/checkdocs.yml'
-      - '.github/scripts/**'
+      - '.github/scripts/mdlinkcheck'
+      - '/scripts/**'
       - '**.md'
       - 'docs/*'
   pull_request:
@@ -23,6 +24,7 @@ name: Docs
     paths:
       - '.github/workflows/checkdocs.yml'
       - '.github/scripts/**'
+      - '.github/scripts/mdlinkcheck'
       - '**.md'
       - 'docs/*'
 
index 395fc85cbd16f4a57ed45f26deb7af9af3e9fe4e..7df3f03d5cece3e6e209553ef866fd45ba5c51ee 100755 (executable)
@@ -94,7 +94,7 @@ sub storelink {
     $dir =~ s:([^/]*\z)::;
 
     while($link =~ s:^\.\.\/::) {
-        $dir =~ s:^([^/]*)/::;
+        $dir =~ s:([^/]*)\/\z::;
     }
 
     $flink{"./$dir$link"} .= "$f:$line ";