如何解决如何确定在PugjsJade上块注释的结尾?
如何在子元素之前将元素添加到带有块注释的父元素中? 我尝试这样做,但这给了我两个选择:
1-将子元素设为同级元素!我不想
body
main
.main-container#main
// this is a comment will apper on html file
//- this is a comment will not apper on html file
p hello
2-如果我给它2个缩进,子元素将成为块注释的一部分,如果我给它一个缩进,则会抛出错误!
body
main
.main-container#main
// this is a comment will apper on html file
//- this is a comment will not apper on html file
p hello
解决方法
注释和段落元素应与其父元素的子元素处于相同的缩进级别:
body
main#main
.main-container
// this comment will appear in compiled HTML
//- this comment won't appear in compiled HTML
p hello
请注意,注释语法的第一个正斜杠与p
处于同一级别。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。