Lucas David Ferrero
Lucas David Ferrero

Reputation: 1912

Snippet on Visual Studio Code

Hi everyone I've a problem making my snippet on VScode.

Here is the stippet:

"HTML5":{
    "prefix": "html5",
    "body":[
        "<!DOCTYPE html>",
        "<html lang='es'>",
        "\t<head>",
        "\t\t<meta charset='utf-8'>",
        "<meta name='viewport' content='width=device-width, initial-scale=1.0'>",
        "\t\t<title></title>",
        "\t</head>",
        "\t<body>",
        "\t</body>",
        "</html>"
    ],
    "description": "Basic HTML5 document."
}

I'd like to know how can I make string the attributes such the lang='es' , instead I want lang="es" as result. Some help? Thanks!

Upvotes: 0

Views: 1055

Answers (1)

Matt Bierner
Matt Bierner

Reputation: 65633

I believe you just need to escape the double quotes with a backslash, like so: \". Your snippet would look something like:

"body":[
    "<!DOCTYPE html>",
    "<html lang=\"es\">",
    ....

Upvotes: 1

Related Questions