在摘要中转义$字符 [英] Escaping the $ character in snippets

查看:99
本文介绍了在摘要中转义$字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这些天我发现自己在做大量的jQuery,因此我开始将我做的一些常见事情抽象成摘要.我期待与社区分享这些内容,但现在遇到了一个问题.

I find myself doing a ton of jQuery these days, so I started to abstract out some of the common things I do into snippets. I look forward to sharing these with the community, but I'm running into an issue right now.

摘要中的文字是通过在文字名称周围添加美元符号($)来定义的,以分隔要提供的值的位置.这很困难,因为jQuery使用美元符号表示法来使用其许多功能.

The literals in snippets are defined by adding dollar signs ($) around the name of the literal to delimit where the value you would like to provide will go. This is difficult because jQuery uses the dollar sign notation in order to use a lot of its functionality.

代码段的转义序列是什么,因此我可以使用美元符号,并使代码段仍然起作用?

What is the escape sequence for snippets, so I am able to use the dollar sign, and have my snippets still function?

推荐答案

要获取文字$,请尝试将其加倍:$$

To have a literal $ try doubling it: $$

这篇关于在摘要中转义$字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆