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

自古美人都是妖i 提交于 2019-12-25 00:17:29

问题


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>
&ltfoo>
</code></pre>


来源:https://stackoverflow.com/questions/51055016/reveal-js-and-hilightjs-how-to-stop-my-tags-from-being-automatically-closed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!