NomicFoundation / hardhat-vscode

Solidity and Hardhat support for Visual Studio Code
https://hardhat.org
MIT License
163 stars 36 forks source link

Escape character with \ in string not works #549

Open Xeonacid opened 3 months ago

Xeonacid commented 3 months ago

Minimal Reproducible Example:

contract Test {
    function f(string memory s) pure returns (string memory) {
        return string.concat("\"", string.concat(s, "\""));
    }
}

image

kanej commented 3 months ago

I have been able to reproduce this locally. This is a bug.

It might be getting disguised by prettier cleaning up "\"" to '"' on format.