Jade

Comments

Comments

Single line comments look the same as JavaScript comments and must be placed on their own line:

// just some paragraphs
p foo
p bar
<!-- just some paragraphs-->
<p>foo</p>
<p>bar</p>

Jade also supports unbuffered comments, by simply adding a hyphen

//- will not output within markup
p foo
p bar
<p>foo</p>
<p>bar</p>

Block Comments

A block comment is legal as well:

body
  //
    As much text as you want
    can go here.

As much text as you want?

<body>
  <!--
  As much text as you want
  can go here.
  -->
</body>

Conditional Comments

Jade does not have any special syntax for conditional comments. If your line begins with < then it is treated as plain text. So just use normal HTML style conditional comments:

<!--[if IE 8]>
<html lang="en" class="lt-ie9">
<![endif]-->
<!--[if gt IE 8]><!-->
<html lang="en">
<!--<![endif]-->
<html lang="en" class="lt-ie9">?
<!--[if IE 8]>
<html lang="en" class="lt-ie9">
<![endif]-->
<!--[if gt IE 8]><!-->
<html lang="en">
<!--<![endif]-->

Disusun oleh Muhammad Zaini .com