friendica-addons/highlightjs/highlightjs.js

7 lines
226 B
JavaScript
Raw Permalink Normal View History

hljs.initHighlightingOnLoad();
document.addEventListener('postprocess_liveupdate', function () {
var blocks = document.querySelectorAll('pre code:not(.hljs)');
Array.prototype.forEach.call(blocks, hljs.highlightBlock);
});