VS Code - code snippet $ escape ( dollar sign )

VS Code snippet 에서 $ 표시가 필요할 때.

from

"mySnippet": {
	"prefix" : [
    	"test"
    ],
    "body":[
    	"$('body').html();",
        "\t\n",
        "\t"
    ]
}

To

"mySnippet": {
	"prefix" : [
    	"test"
    ],
    "body":[
    	"\\$('body').html();",
        "\t\n",
        "\t"
    ]
}

$ 앞에 \ 를 붙인다.


© 2024. Chiptune93 All rights reserved.