Syntax Highlighting
DocBrowser includes support for Prism syntax highlighting.
To syntax highlight code blocks, include a class="language-xxx"
attribute on
both the outer <pre>
element and the inner <code>
element.
(including the language attribute on both elements removes the need for Prism to add the class via script which can cause layout changes resulting in jitter/creeping on page refresh)
<pre class="language-markup"><code class="language-markup">
...
</code></pre>
You'll also need to include the Prism.JS plugins for any languages you use.
See the <head>
section of the HTML layout for an example.