FShaper icon indicating copy to clipboard operation
FShaper copied to clipboard

Support for new lines in string

Open agracio opened this issue 9 months ago • 8 comments

Hi, I am having a problem when strings contain \n to create a new line in output. It is easy to reproduce using a test.

Input

void Foo() { Console.Write("First line. Second Line"); }

Result

------------------------CONVERTED------------------------
member this.Foo() = Console.Write("First line. Second Line")

Input

void Foo() { Console.Write("First line.\nSecond Line"); }

Result

------------------------CONVERTED------------------------
member this.Foo() =
    Console.Write(
        "First line.
Second Line"
    )

It splits "First line.\nSecond Line" into 2 rows and also adds another new line after member this.Foo() = and Second Line"

EDIT: Same is true for \r, however I can see that \t is resolved correctly

Any ideas how this can be resolved?

agracio avatar May 10 '24 20:05 agracio