Can't seem to get the lib working.
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.4.0/languages/go.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script>
$(document).ready(function() {
$('pre').each(function(i, block) {
hljs.highlightBlock(block);
});
});
</script>
Right now you included the language but not the core library. You also only need to choose one initialization function, because initHighlightingOnLoad and the jQuery $(document).ready(function() { ... }) are essentially the same thing. So change your example to:
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.8.0/highlight.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.8.0/languages/go.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
@sourrust I forgot I created this issue, I found it out myself already, Only thing I can say is that the docs are not very clear in that case.
Most helpful comment
@sourrust I forgot I created this issue, I found it out myself already, Only thing I can say is that the docs are not very clear in that case.