【发布时间】:2013-12-27 21:06:16
【问题描述】:
如何在 Pug 模板引擎中阻止注释掉代码?
我知道如何注释掉一行:
//-doesn't show
但我不想像这样写完整的 html cmets:
<!--
no show
-->
【问题讨论】:
标签: pug
如何在 Pug 模板引擎中阻止注释掉代码?
我知道如何注释掉一行:
//-doesn't show
但我不想像这样写完整的 html cmets:
<!--
no show
-->
【问题讨论】:
标签: pug
//-
Just indent the comment
like normal elements
就像对其他元素一样缩进您的评论。
请注意缩进正确,否则注释可能超出预期。
【讨论】:
https://pugjs.org/language/comments.html#block-comments
缓冲 cmets - 评论将出现在呈现的 HTML 中
//
Comments for your HTML readers.
Use as much text as you want.
无缓冲 cmets - 评论将不会出现在呈现的 HTML 中
//-
Comments for your template writers.
Use as much text as you want.
【讨论】: