This is what you what your snippet should be:
"Ejercicio": {
"prefix": "ejer",
"body": [
"<section data-type=\"sect2\">",
" <h2>Ejercicio</h2>",
" <p></p>",
" <section data-type=\"sect3\">",
" <h3>Solución</h3>",
" <figure>",
" <figcaption></figcaption>",
" <img src=\"\" alt=\"\"/>",
" </figure>",
" <p></p>",
" </section>",
"</section>"
],
"description": "Ejercicio"
}
Note. You are not setting the "body"
property correctly.
Specifically, you have not correctly escaped the multiple "
with \"
You can not just copy and paste code into the "body"
you have to first format it correctly. As either a single string or a collection of strings.
From the VSCode documentation:
body
is one or more lines of content, which will be joined as multiple lines upon insertion. Newlines and embedded tabs will be formatted according to the context in which the snippet is inserted.
See VSCode snippet documentation for reference: https://code.visualstudio.com/docs/editor/userdefinedsnippets#_create-your-own-snippets