Skip to content

Commit e31672a

Browse files
committed
Fix closing tag check.
1 parent 85befa1 commit e31672a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/BenchmarkDotNet/Toolchains/CsProj/CsProjGenerator.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,14 @@ private static void AppendPackageReference(string line, StringBuilder stringBuil
150150
do
151151
{
152152
stringBuilder.AppendLine(line);
153+
line = RemoveAllWhiteSpace(line);
153154
}
154-
while (!line.EndsWith("\" />") && !line.EndsWith("</PackageReference>") && (line = streamReader.ReadLine()) != null);
155+
while (!line.EndsWith("/>") && !line.EndsWith("</PackageReference>") && (line = streamReader.ReadLine()) != null);
155156
}
156157

158+
private static string RemoveAllWhiteSpace(string value)
159+
=> new string(value.Where(c => !char.IsWhiteSpace(c)).ToArray());
160+
157161
/// <summary>
158162
/// returns a path to the project file which defines the benchmarks
159163
/// </summary>

0 commit comments

Comments
 (0)