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 e31672a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/BenchmarkDotNet/Toolchains/CsProj/CsProjGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,14 @@ 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.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 e31672a

Please sign in to comment.