Skip to content

Commit

Permalink
AddUsingDirectiveIfNeeded: normalise namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
yecril71pl committed Jan 8, 2022
1 parent 21a2b73 commit f56387a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static CompilationUnitSyntax AddUsingDirectiveIfNeeded(string namespaceNa
return rootNode;
}

if (rootNode.Usings.Any(usingNode => usingNode.Name.ToString() == namespaceName))
if (rootNode.Usings.Any(usingNode => usingNode.Name.NormalizeWhitespace().ToString() == namespaceName))
{
// Using already present, return this node
return rootNode;
Expand Down

0 comments on commit f56387a

Please sign in to comment.