Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roslyn Transform "Convert to interpolated string" does not account for quotes #68425

Open
hopperpl opened this issue Jun 2, 2023 · 0 comments · May be fixed by #76049
Open

Roslyn Transform "Convert to interpolated string" does not account for quotes #68425

hopperpl opened this issue Jun 2, 2023 · 0 comments · May be fixed by #76049

Comments

@hopperpl
Copy link

hopperpl commented Jun 2, 2023

Version Used:

17.7 P1 (Rosyln version no longer listed)

Steps to Reproduce:

Parameters["comment"] = '"' + sketch.Comment + '"';

use Lightbulb -> Convert to interpolated string

Expected Behavior:

Parameters["comment"] = $@"""{sketch.Comment}""";
Parameters["comment"] = $"\"{sketch.Comment}\"";

Actual Behavior:

Parameters["comment"] = $""{sketch.Comment}"";

which is not properly escaped and syntax is invalid;

There are similar issues with other escape characters, I just report this one example.


image

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Jun 2, 2023
@arunchndr arunchndr added Bug and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants