Search code examples
visual-studio-codecode-snippets

Code snippet with special sign = ' " ' in VSCode


I have written following snippet:

"Insert IMG": {
    "prefix": "iimg",
    "body": [
        "<img src='./img/$1/$2'><br><br>",
    ],
    "description": "Insert image to MD file"
}

but in the body I want to have:

"<img src="./img/$1/$2"><br><br>",

How to achieve it? I was trying with hex code but does not work ;/


Solution

  • If you want double quotes, just escape them:

        "<img src=\"./img/$1/$2\"><br><br>",