How do you escape curly braces ({ }) in emmet in VSCode

Viewed 334

Specifically, I'd like to escape two curly braces, in VSCode.

Often time I find myself writing templates like this:

<div class="something">
  <p>{{ value }}</p>
  <p>text</p>
</div>

While <p>text</p> can be easily achieved with p{text}, I am stumped on how would one be able to achieve <p>{{ value }}</p> using an emmet shorthand.

It would be great if anyone can point out how to achieve this via emmet.

1 Answers

I was able to make it work by escaping the } characters. Here's an example:

a[href="{{ site:url }}"]{{{ site:name \}\}}

Renders:

<a href="{{ site:url }}">{{ site:name }}</a>
Related