reveal.js and hilightjs - how to stop my tags from

2019-08-23 09:55发布

I am making a presentation using reveal.js

I want to display the following in a nice syntax highlighted code block:

<foo>

So in my presentation html I do this:

<pre><code class="hljs" data-trim contenteditable>
<foo>
</code></pre>

This is what gets displayed instead:

<foo>
</foo>

How do I stop my tags from getting closed for me?

1条回答
Ridiculous、
2楼-- · 2019-08-23 10:49

This works:

<pre><code class="hljs" data-trim contenteditable>
&ltfoo>
</code></pre>
查看更多
登录 后发表回答