Closed j4m3z0r closed 3 years ago
Wow, this seems somehow connected to the #ecs
macro; removing it or replacing it with something else preserves the comment. Changing the class into a method or property also fixes it. The blank line often disappears from the output, which is likely to be a separate bug.
This will be fixed in the 2.9.0 release. The bug was in #useSymbols
which is part of #ecs
. This macro would always recreate the braced block of a class, struct, or interface. So a comment, newline or #region
would disappear if it was attached to the opening brace (body.Target
) of a class, struct or interface.
While researching the test-cases in #58, I discovered that newlines surrounding comments can affect whether or not the comments are emitted in the output. For example:
Will omit the first comment, whereas the comment is preserved in either of the following two versions: