mecode4food
mecode4food

Reputation: 320

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

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.

Upvotes: 2

Views: 807

Answers (1)

theutz
theutz

Reputation: 12302

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>

Upvotes: 3

Related Questions