繁体   English   中英

如何使用Jade显示多行HTML代码块

[英]How to show multi-line HTML code block with Jade

我将Jade与Node js结合使用,并希望在引导网页中显示HTML代码块。

我尝试了这个

  p
    | Copy and paste the following HTML code in a web page.

  code
    | <div class="container">
    |    <iframe src="http://ea-studio.forexsb.com"
    |         style="width: 100%; min-height: 1500px" >
    |    </iframe>
    | </div>

但是它没有显示代码,而是执行了它。 结果真的很有趣。 我的应用程序本身集成了:),但这不是我的意图。

Jade显示多行源代码的方式是什么?

编辑:

转义HTML会显示代码,但要一行显示:

  code
    | &lt;div class=&quot;container&quot;&gt;
    |    &lt;iframe src=&quot;http://ea-studio.forexsb.com&quot;
    |         style=&quot;width: 100%; min-height: 1500px&quot; &gt;
    |    &lt;/iframe&gt;
    | &lt;/div&gt;

生产:

<div class="container"> <iframe src="http://ea-studio.forexsb.com" style="width: 100%; min-height: 1500px" > </iframe> </div>

这为我工作:

p.
  Copy and paste the following HTML code in a web page.

pre
  code
    | &lt;div class="container">
    |    &lt;iframe src="http://ea-studio.forexsb.com"
    |         style="width: 100%; min-height: 1500px">
    |    &lt;/iframe>
    | &lt;/div>

在此处输入图片说明

http://codepen.io/antibland/pen/wGOeeo?editors=1000

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM