Skip to content

Commit 1eb3b77

Browse files
committed
Fixed extraneous new lines when generating multi-line comments.
1 parent 8689812 commit 1eb3b77

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Generator/Generators/CodeGenerator.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,12 @@ public virtual void GenerateComment(RawComment comment)
160160
lines.Add("<summary>");
161161
foreach (string line in HtmlEncoder.HtmlEncode(comment.BriefText).Split(
162162
Environment.NewLine.ToCharArray()))
163+
{
164+
if (string.IsNullOrWhiteSpace(line))
165+
continue;
166+
163167
lines.Add($"<para>{line}</para>");
168+
}
164169
lines.Add("</summary>");
165170
}
166171
else

0 commit comments

Comments
 (0)