From 5be60fc2ce63570ad86aacdfab3a6cf9297a14ac Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Sun, 6 Aug 2023 22:08:00 +1000 Subject: [PATCH] Add missing else on empty include (#623) --- src/MarkdownSnippets/Processing/IncludeProcessor.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/MarkdownSnippets/Processing/IncludeProcessor.cs b/src/MarkdownSnippets/Processing/IncludeProcessor.cs index 606b3c95..88dd8726 100644 --- a/src/MarkdownSnippets/Processing/IncludeProcessor.cs +++ b/src/MarkdownSnippets/Processing/IncludeProcessor.cs @@ -188,7 +188,6 @@ static IEnumerable BuildMultiple(Line line, string? path, Include include, { yield return line.WithCurrent($"{first}"); } - } for (var index = 1; index < include.Lines.Count - 1; index++) @@ -222,8 +221,10 @@ static IEnumerable BuildEmpty(Line line, string? path, Include include, bo { yield return line.WithCurrent($""); } - - yield return line.WithCurrent($""); + else + { + yield return line.WithCurrent($""); + } } static IEnumerable BuildSingle(Line line, string? path, Include include, bool writePath)