Skip to content
New issue

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

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

Already on GitHub? # to your account

"Convert to compile-time constant message template" loses the track of parameters if a message contains single-quotes #116

Open
VyacheslavPritykin opened this issue Oct 24, 2024 · 0 comments

Comments

@VyacheslavPritykin
Copy link

The "Convert to compile-time constant message template" feature transforms these lines:

var aaa = 123;
var bbb = 456;
_logger.LogInformation($"A: '{aaa}', B: {bbb}");
_logger.LogInformation($"A: ''''''' {aaa}");

into these:

var aaa = 123;
var bbb = 456;
_logger.LogInformation("A: \'Aaaa}\', B:Bbbbb}", aaa, bbb);
_logger.LogInformation("A: \'\'\'\'\Aaa\' {Aaa}", aaa);

The gif:
2024-10-24 18 17 17

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant