在SLIM中编写HTML注释时:
/! The first line of comments
/! The second line of comments
输出变为
<!-- The first line of comments --><!-- The second line of comments -->
所有其他生成的HTML格式正确并缩进,因为我将pretty
设置为true
我正在为其他人编写模板,所以我需要带有换行符的注释以便于阅读。
答案 0 :(得分:14)
您可以在Slim中实现单个多行注释,如下所示:
/!
The first line of comments
The second line of comments
哪个应输出:
<!-- The first line of comments
The second line of comments -->