Skip to content

Commit 033f133

Browse files
Report the normalized link target in link-checker error messages
1 parent d889b58 commit 033f133

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/scripts/Test-DocumentationLink.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ function Test-LinkTarget {
108108
if ($path.StartsWith('/')) { return } # absolute site path - not resolvable here
109109
$resolved = [System.IO.Path]::GetFullPath([System.IO.Path]::Combine($File.DirectoryName, $path))
110110
if (-not ([System.IO.File]::Exists($resolved) -or [System.IO.Directory]::Exists($resolved))) {
111-
$Broken.Add("${Rel}:${LineNo}: '$Target' - target does not exist")
111+
$Broken.Add("${Rel}:${LineNo}: '$t' - target does not exist")
112112
return
113113
}
114114
if ($frag -and $resolved.EndsWith('.md') -and ($frag -notin (Get-CachedSlug $resolved))) {
115-
$Broken.Add("${Rel}:${LineNo}: '$Target' - no heading '#$frag' in the target file")
115+
$Broken.Add("${Rel}:${LineNo}: '$t' - no heading '#$frag' in the target file")
116116
}
117117
}
118118

0 commit comments

Comments
 (0)