Fix invalid CodeDom comment generation when a new line starts with a slash (#56640)
authorJoseph Musser <me@jnm2.com>
Mon, 9 Aug 2021 03:19:06 +0000 (23:19 -0400)
committerGitHub <noreply@github.com>
Mon, 9 Aug 2021 03:19:06 +0000 (21:19 -0600)
commit7a799ce4d21bf0777ca08f4fbf7981a233bb1d0c
tree0eb64b871cf90cc8ffd95f8e628795dce2bd8ac7
parentc36ba2d8183ce0d7a36b74a226ffdf3d68721675
Fix invalid CodeDom comment generation when a new line starts with a slash (#56640)

* Failing tests where CodeDom creates invalid comment types

* Prevent CodeDom from creating invalid comment types

* Make C# generator impl more consistent with VB generator

* Switch attribute from ActiveIssue to SkipOnTargetFramework

* Be even more conservative about when the space is needed

* Attempt to improve readability

* Update VBCodeGenerationTests.cs

Co-authored-by: Dan Moseley <danmose@microsoft.com>
src/libraries/System.CodeDom/src/Microsoft/CSharp/CSharpCodeGenerator.cs
src/libraries/System.CodeDom/src/Microsoft/VisualBasic/VBCodeGenerator.cs
src/libraries/System.CodeDom/src/StringExtensions.cs [new file with mode: 0644]
src/libraries/System.CodeDom/src/System.CodeDom.csproj
src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/CSharpCodeGenerationTests.cs
src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/VBCodeGenerationTests.cs