问题
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:
This works:
<pre><code class="hljs" data-trim contenteditable>
<foo>
</code></pre>
来源:https://stackoverflow.com/questions/51055016/reveal-js-and-hilightjs-how-to-stop-my-tags-from-being-automatically-closed