nikitakunevich / vscode-snippet-creator

vscode extension for creating snippets
MIT License
44 stars 25 forks source link

Why does it convert "\t" to "\\t"? #15

Open jugyo opened 6 years ago

jugyo commented 6 years ago

https://github.com/nikitaKunevich/vscode-snippet-creator/blob/852f6afbf14439e9ad9f6244e6273d77a3d56ecf/extension.js#L201

e.g.

Selected text:

    fmt.Println("hello world")

Snippet to be created:

    "test": {
        "prefix": "test",
        "body": [
            "func main() {",
            "\\tfmt.Println(\"hello world\")",
            "}",
            ""
        ],
        "description": "test"
    }

Output:

\tfmt.Println("hello world")

Expected:

    fmt.Println("hello world")
lrstanley commented 6 years ago

related to https://github.com/nikitaKunevich/vscode-snippet-creator/issues/6