Skip to content

taufik-nurrohman/generic-syntax-highlighter

Repository files navigation

Generic Syntax Highlighter

Demo

Usage

Put generic-syntax-highlighter.min.js script just before the </body> tag then call GSH(node) function next to it, where node is a HTML collection or a HTML node.

<script src="generic-syntax-highlighter.min.js"></script>
<script>
window.addEventListener('DOMContentLoaded', function() {
    GSH(document.querySelectorAll('pre > code:not(.txt)'));
});
</script>