1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
|
extends ../reference.jade
block documentation
h1 Comments
p Single line comments look the same as JavaScript comments and must be placed on their own line:
.row(data-control='interactive')
.col-lg-6
+jade
:jadesrc
// just some paragraphs
p foo
p bar
.col-lg-6
+html
:htmlsrc
<!-- just some paragraphs -->
<p>foo</p>
<p>bar</p>
p Jade also supports unbuffered comments, by simply adding a hyphen
.row(data-control='interactive')
.col-lg-6
+jade
:jadesrc
//- will not output within markup
p foo
p bar
.col-lg-6
+html
:htmlsrc
<p>foo</p>
<p>bar</p>
h2 Block Comments
p A block comment is legal as well:
.row(data-control='interactive')
.col-lg-6
+jade
:jadesrc
body
//
As much text as you want
can go here.
.col-lg-6
+html
:htmlsrc
<body>
<!--
As much text as you want
can go here.
-->
</body>
h2 Conditional Comments
p.
Jade does not have any special syntax for conditional comments.
If your line begins with #[code >] then it is treated as plain text.
So just use normal HTML syle conditional comments:
.row(data-control='interactive')
.col-lg-6
+jade
:htmlsrc
<!--[if IE 8]>
<html lang="en" class="lt-ie9">
<![endif]-->
<!--[if gt IE 8]><!-->
<html lang="en">
<!--<![endif]-->
.col-lg-6
+html
:htmlsrc
<!--[if IE 8]>
<html lang="en" class="lt-ie9">
<![endif]-->
<!--[if gt IE 8]><!-->
<html lang="en">
<!--<![endif]-->
|