diff --git a/cleanrepo/Repo.cs b/cleanrepo/Repo.cs index a128e39a..336aa1aa 100644 --- a/cleanrepo/Repo.cs +++ b/cleanrepo/Repo.cs @@ -196,14 +196,16 @@ internal void OutputImageReferences(bool ocrImages = false, bool filteredOcrImag if (ocrImages) { WriteOcrImageRefsToFile(); - } else if (ocrImages && filteredOcrImage) + } + else if (ocrImages && filteredOcrImage) { WriteFilteredOcrImageRefsToFile(); - } else + } + else { WriteImageRefsToFile(); } - + } /// @@ -327,17 +329,13 @@ internal List GetAllRedirects() if (docfx == null) return null; - string? docsetPath = null; - - // If there's more than one docset, choose the one that includes the input directory. if (docfx.build?.content is not null) { foreach (Content entry in docfx.build.content) { - if (entry.src == null) - continue; + string? docsetPath; - if (entry.src.TrimEnd('/') == ".") + if (entry.src == null || entry.src.TrimEnd('/') == ".") docsetPath = DocFxDirectory!.FullName; else docsetPath = Path.GetFullPath(entry.src, DocFxDirectory!.FullName);