Skip to content

Commit

Permalink
Add missing else on empty include (#623)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp authored Aug 6, 2023
1 parent 963c434 commit 5be60fc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/MarkdownSnippets/Processing/IncludeProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ static IEnumerable<Line> BuildMultiple(Line line, string? path, Include include,
{
yield return line.WithCurrent($"{first}<!-- include: {key} -->");
}

}

for (var index = 1; index < include.Lines.Count - 1; index++)
Expand Down Expand Up @@ -222,8 +221,10 @@ static IEnumerable<Line> BuildEmpty(Line line, string? path, Include include, bo
{
yield return line.WithCurrent($"<!-- emptyInclude: {include.Key}. path: {path} -->");
}

yield return line.WithCurrent($"<!-- emptyInclude: {include.Key} -->");
else
{
yield return line.WithCurrent($"<!-- emptyInclude: {include.Key} -->");
}
}

static IEnumerable<Line> BuildSingle(Line line, string? path, Include include, bool writePath)
Expand Down

0 comments on commit 5be60fc

Please sign in to comment.