Mustache.js icanhaz 中的注释不起作用?
我的模板中有以下内容
{{! This is a comment that shouldn't be rendered }}
,我使用此处的演示进行了尝试: http://mustache.github.com/#demo
并在这里找到了一个来自 Mustache 的示例: https://github.com/janl/mustache.js/blob /master/examples/comments.html
但是评论正在在我的模板中呈现。
我正在使用 iCanHaz 0.9。
I have the following in my template
{{! This is a comment that shouldn't be rendered }}
I tried it using the demo here:
http://mustache.github.com/#demo
And found an example from mustache here:
https://github.com/janl/mustache.js/blob/master/examples/comments.html
But comments are rendering in my templates.
I'm using iCanHaz 0.9.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一定是 Mustache.js 的某种错误 - 你应该向他们报告
如果你尝试
{{ !这是一条不应呈现的注释 }}
(注意多余的空格),评论将不会被渲染
Must be some sort of bug with mustache.js - you should report it to them
If instead you try
{{ ! This is a comment that shouldn't be rendered }}
(notice the extra space), the comment will NOT be rendered