pug - html to jade error when contains <pre> -


i have static html documents, , want convert them jade. tried html2jade in npm, ok except this: <pre> elements in html convert empty, can me?

the html code looks this:

<pre><code>&lt;p&gt;hello&lt;/p&gt;&lt;span&gt;hello again&lt;/span&gt;</code></pre> 

the result is:

pre. 

you can write couple different ways in jade. here 2 different methods. first takes advantage of jade's automatic escaping while second uses html entities instead.

automatic escaping:

pre     code= '<p>hello</p><span>hello again</span>' 

html entities:

pre     code &lt;p&gt;hello&lt;/p&gt;&lt;span&gt;hello again&lt;/span&gt; 

Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -