Closed vidjuheffex closed 4 years ago
Here's the html5 recommended spec on pre/code blocks: https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-code-element
In markdown, labeling the fenced code blocks with the language name, i.e. having:
```javascript function(){}
in most libraries becomes: <pre><code class="language-javascript"></code></pre>
<pre><code class="language-javascript"></code></pre>
This in turn allows easier syntax highlighting with libraries like prism.js and others.
Hi Julian,
Thanks for the suggestion and the reference. The last version generates something similar but it lacks the "language-" prefix. I will add it right away.
-- Manuel
Here's the html5 recommended spec on pre/code blocks: https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-code-element
In markdown, labeling the fenced code blocks with the language name, i.e. having:
in most libraries becomes:
<pre><code class="language-javascript"></code></pre>
This in turn allows easier syntax highlighting with libraries like prism.js and others.