0

Hallo allerseits Ich habe ein Problem, mein Snippet auf VScode.Snippet auf Visual Studio Code

Hier die stippet ist:

"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." 
} 

ich wissen möchte, wie kann ich String, der die Attribute, wie die lang = 'es', statt Ich möchte lang = "es" als Ergebnis machen. Etwas Hilfe? Danke!

Antwort

1

Ich glaube, Sie müssen nur die Anführungszeichen mit einem Backslash, wie folgt zu entkommen: \". Ihr Snippet würde etwa so aussehen:

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

danke, es funktioniert! –

Verwandte Themen