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><p>hello</p><span>hello again</span></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 <p>hello</p><span>hello again</span>
Comments
Post a Comment