项目作者: taufik-nurrohman

项目描述 :
Generic syntax highlighter.
高级语言: PHP
项目地址: git://github.com/taufik-nurrohman/generic-syntax-highlighter.git


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.

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