Skip to content

Commit

Permalink
Fix multiline code description parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Sajidur78 committed Sep 29, 2023
1 parent 96223b2 commit 3532b41
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Source/Libraries/HedgeModManager.CodeCompiler/CSharpCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ public static List<CSharpCode> Parse(StreamReader reader)
// Parse description of the last code
if (currentCode != null)
{
currentCode.Body = lineBuilder.ToString().TrimEnd('\r', '\n');

if (isMultilineDescription)
{
currentCode.Description = DescriptionFromBody(currentCode);
}

currentCode.Body = lineBuilder.ToString().TrimEnd('\r', '\n');
}

lineBuilder.Clear();
Expand Down Expand Up @@ -175,12 +175,12 @@ the description will be on the next line. */
// Parse the last one
if (currentCode != null)
{
currentCode.Body = lineBuilder.ToString().TrimEnd('\r', '\n');

if (isMultilineDescription)
{
currentCode.Description = DescriptionFromBody(currentCode);
}

currentCode.Body = lineBuilder.ToString().TrimEnd('\r', '\n');
}
}

Expand Down

0 comments on commit 3532b41

Please sign in to comment.