Skip to content

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

@VyacheslavPritykin

Description

@VyacheslavPritykin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions