Use a class instead of a data attribute to specify the language, e.g. class="language-ruby".
This is what the WHATWG suggests and what highlight.js supports. There's no straightforward way to have highlight.js use a data attribute for language detection.
Use a class instead of a data attribute to specify the language, e.g.
class="language-ruby"
. This is what the WHATWG suggests and what highlight.js supports. There's no straightforward way to have highlight.js use a data attribute for language detection.