scripts/mdlinkcheck: fix the ../ handling in file links

Follow-up to 62515e8e9d

Closes #15797
This commit is contained in:
Daniel Stenberg 2024-12-21 13:26:56 +01:00
parent 250d613763
commit 28dd14aafe
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
2 changed files with 4 additions and 2 deletions

View 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/*'

View File

@ -94,7 +94,7 @@ sub storelink {
$dir =~ s:([^/]*\z)::;
while($link =~ s:^\.\.\/::) {
$dir =~ s:^([^/]*)/::;
$dir =~ s:([^/]*)\/\z::;
}
$flink{"./$dir$link"} .= "$f:$line ";