Laxmikant Dange
Laxmikant Dange

Reputation: 7688

How to use $ in emmet

Hi I want to display $123,456.00 in a span. I tried with span{$123,456.00} and it is expanding to <span>,456.00</span> (I understand $ is used to render index in loop). How can I escape $ in emmet so I can get expansion <span>123,456.00</span>

Editor: Visual Studio Code

System: Mac OS Sierra

Upvotes: 2

Views: 474

Answers (1)

Suraj Rao
Suraj Rao

Reputation: 29635

According to Emmet Docs,

The $ character is used for tabstops and variables, the | character it used to indicate caret position when snippet is expanded. If you want to output these characters as-is, you should use double backslash to escape them: \\$ or \\|

So ,

span{\\$123,456.00} should work.

It seems Visual Studio Code has a bug and I have raised an issue to track it.

Update

Seems to be fixed.

According to the developer:

A single escape will work in tonight's Insiders.

So, span{\$123,456.00} should work in the next update of the editor.

Upvotes: 1

Related Questions