在 jade/pug 中屏蔽 HTML 的整个部分而不是单独的行

Block entire sections of HTML in jade/pug instead of individual lines

在 Jade/Pug 中,您可以使用管道

渲染原始 HTML
| <div>some stuff</div>

如果需要屏蔽几百行,有什么有效的方法吗?

是的,只需在 parent 标记末尾使用句点即可。这在 script 元素中经常使用:

script.
  (type as many Javascript lines as you want here)

Plain Text documentation

header"Block in a Tag"下看