Skip to content

Comments not emitted based on surrounding whitespace #59

@j4m3z0r

Description

@j4m3z0r

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:

#ecs;

namespace Test
{
	internal class Class
	{
		// #region test region
		
		[DllImport(Constants.Lib, EntryPoint = "testfunction")]
		public static extern int TestFunction(int i);
		//#endregion
	}
}

Will omit the first comment, whereas the comment is preserved in either of the following two versions:

#ecs;

namespace Test
{
	internal class Class
	{
		// #region test region
		[DllImport(Constants.Lib, EntryPoint = "testfunction")]
		public static extern int TestFunction(int i);
		//#endregion
	}
}
#ecs;

namespace Test
{
	internal class Class
	{

		// #region test region

		[DllImport(Constants.Lib, EntryPoint = "testfunction")]
		public static extern int TestFunction(int i);
		//#endregion
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions