Skip to content

Commit

Permalink
Fix closing tag check.
Browse files Browse the repository at this point in the history
  • Loading branch information
timcassell committed Jun 30, 2023
1 parent 85befa1 commit 66a04c4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/BenchmarkDotNet/Toolchains/CsProj/CsProjGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,16 @@ private static void AppendPackageReference(string line, StringBuilder stringBuil
do
{
stringBuilder.AppendLine(line);
line = RemoveAllWhiteSpace(line);
}
while (!line.EndsWith("\" />") && !line.EndsWith("</PackageReference>") && (line = streamReader.ReadLine()) != null);
while (!line.EndsWith("/>") && !line.EndsWith("</PackageReference>") && (line = streamReader.ReadLine()) != null);
}

private static string RemoveAllWhiteSpace(string value)
=> new string(value.ToCharArray()
.Where(c => !char.IsWhiteSpace(c))
.ToArray());

/// <summary>
/// returns a path to the project file which defines the benchmarks
/// </summary>
Expand Down

0 comments on commit 66a04c4

Please sign in to comment.