Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions cleanrepo/Repo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

}

/// <summary>
Expand Down Expand Up @@ -327,17 +329,13 @@ internal List<Redirect> 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);
Expand Down
Loading