I would like to keep the code included on slides in separate files, to be able to, for example, lint and format them. But I'm having some trouble with the options I've tried so far:
I've tried a couple of variations of <object data="[…]"></object>. <pre><code class="bash"><object data="my.bash"></object></code></pre> escapes the inner HTML. <pre><code class="bash" data-noescape><object data="my.bash"></object></code></pre> does not escape the inner HTML, but also does not escape the contents of my.bash, so highlight.js rightfully doesn't want to touch it.
I would like to keep the code included on slides in separate files, to be able to, for example, lint and format them. But I'm having some trouble with the options I've tried so far:
<object data="[…]"></object>
.<pre><code class="bash"><object data="my.bash"></object></code></pre>
escapes the inner HTML.<pre><code class="bash" data-noescape><object data="my.bash"></object></code></pre>
does not escape the inner HTML, but also does not escape the contents ofmy.bash
, so highlight.js rightfully doesn't want to touch it.