Mustache.js icanhaz 中的注释不起作用?

发布于 2024-12-06 14:25:50 字数 480 浏览 1 评论 0原文

我的模板中有以下内容

{{! 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技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

瀟灑尐姊 2024-12-13 14:25:50

一定是 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文