Skip to content

Commit

Permalink
Merge pull request #24 from Ellerbach/ignore-xref-links
Browse files Browse the repository at this point in the history
Excluded ftp, xref and mailto protocols from validation.
  • Loading branch information
Ellerbach authored Mar 20, 2023
2 parents 0c7b491 + fcd25bc commit 855a5e2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/DocLinkChecker/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,10 @@ private static void ProcessFile(DirectoryInfo folder, string filepath)
// check link if not to a URL, in-doc link or e-mail address
if (!relative.StartsWith("http:") &&
!relative.StartsWith("https:") &&
!relative.Contains("@") &&
!relative.StartsWith("ftp:") &&
!relative.StartsWith("ftps:") &&
!relative.StartsWith("xref:") &&
!relative.StartsWith("mailto:") &&
!string.IsNullOrEmpty(Path.GetExtension(relative)) &&
!string.IsNullOrWhiteSpace(relative))
{
Expand Down

0 comments on commit 855a5e2

Please sign in to comment.