Reputation: 2096
I would like the generated HTML to be:
<!DOCTYPE html>
<html>
<head></head>
<body>
<pre>First line
<em>Second line</em>
Third line</pre>
</body>
</html>
I tried using:
doctype html
html
head
body
pre.
First line
em second line
third line
But it doesn't work, because pre.
considers everything under it to be text. So I tried removing it and using |
instead, as in:
doctype html
html
head
body
pre
| First line
em second line
| third line
But this puts everything inside the pre
on a single line, as in:
<!DOCTYPE html>
<html>
<head></head>
<body>
<pre>First line<em>second line</em>third line</pre>
</body>
</html>
Which is not what I want. As far as I can see, my only option is to embed HTML in Jade, as in:
doctype html
html
head
body
pre.
First line
<em>second line</em>
third line
Is there another way?
Upvotes: 0
Views: 698
Reputation: 34677
You want escaped HTML
pre.
First line
<em>second line</em>
third line
or with the use of #{}
:
pre.
First line
#{"<em>second line</em>"}
third line
Upvotes: 1