paul1956 / CSharpToVB

New version of CSharpToVB converter
MIT License
25 stars 9 forks source link

Converting a string containing \" #63

Closed lorcQc closed 3 years ago

lorcQc commented 3 years ago

When I paste this code in the converter : test1 = "Simple\"Test";

If the "colorize source" option is active, the code is transformed into : test1 = "Simple\"Test"\"Test";

Regardless of the option "colorize source" is active or not, the generated VB code is incorrect. test1 = "Simple""Test"""Test"

paul1956 commented 3 years ago

@lorcQc I saw that when the colorizer is on. There is """ and some extra text. This is coming from the colorizer and I have not yet figured out why. The version I just posted I turn off the colorizer for many scenarios which helps. But I need to figure would what is happening, the colorize code is something I have will the original repo and I haven't changed it but maybe on the the Roslyn libraries has changed. I will look at this today.

With the colorizer off it looks to me to be generating the correct result

test1 = "Simple""Test"
lorcQc commented 3 years ago

I confirm that when "Colorize Result" and "Colorize Source" are off, it works. Thank you!

paul1956 commented 3 years ago

I believe this was a new feature added to Roslyn Colorization that I did not support, I am looking to work around it, until I understand it. It is "fixed" in New in 5.0.0.25/5.0.0.23. @DualBrain this also addresses your issue.