The prism.js documentation states
Prism forces you to use the correct element for marking up code:
<code>. On its own for inline code, or inside a<pre>for blocks of code - https://prismjs.com/#features-full
We're using a document management system, that does not allow any HTML code inside a <pre> tag
<pre>some code</pre>- formatting is correct, but no syntax highlighing<code>some code</code>- syntax highlighing works, but all line breaks/indentations are removed by the CMS<pre><code>some code</code></pre>- transformed to<pre><code>some code</pre>by the CMS
Is there a way to have prism.js add syntax highlighting to a <pre> tag, like this:
<pre class="language-javascript">
if (test) {
someCode();
}
</pre>
Maybe there's a plugin or a JS configuration to tell prism.js to highlight those <pre> tags.