This project is read-only.

NormalizeWhitespace() produces unhandy whitespaces for blocks in some contexts

Topics: APIs
Aug 24, 2014 at 4:33 PM
Hello!

Simple test case
SyntaxFactory.ParseStatement("{{}f();}").NormalizeWhitespace("  ").ToFullString();
produces the following output:
{
  {
  }

  f();
}
but this one
SyntaxFactory.ParseStatement("{{} f(() => {});}").NormalizeWhitespace("  ").ToFullString();
produces the such output:
{
  {
  }

  f(() =>
  {
  }

  );
}
Seems Block and/or CloseParen have redundant leading/trailing trivia in the such case.

Thank you.