Sample dan CSS yang digunakan

CSS (Copy CSS ini ke Template)

/*!
 * Agate by Taufik Nurrohman <https://github.com/taufik-nurrohman>
 * ---------------------------------------------------------------
 *
 * #ade5fc
 * #a2fca2
 * #c6b4f0
 * #d36363
 * #fcc28c
 * #fc9b9b
 * #ffa
 * #fff
 * #333
 * #62c8f3
 * #888
 *
 */.hljs{display:block;overflow-x:auto;padding:.5em;background:#333;color:#fff}
 .hljs-name,.hljs-strong{font-weight:700}
 .hljs-code,.hljs-emphasis{font-style:italic}
 .hljs-tag{color:#62c8f3}
 .hljs-selector-class,.hljs-selector-id,.hljs-template-variable,.hljs-variable{color:#ade5fc}
 .hljs-bullet,.hljs-string{color:#a2fca2}
 .hljs-attribute,.hljs-built_in,.hljs-builtin-name,.hljs-quote,.hljs-section,.hljs-title,.hljs-type{color:#ffa}
 .hljs-bullet,.hljs-number,.hljs-symbol{color:#d36363}
 .hljs-keyword,.hljs-literal,.hljs-selector-tag{color:#fcc28c}
 .hljs-code,.hljs-comment,.hljs-deletion{color:#888}.hljs-link,.hljs-regexp{color:#c6b4f0}
 .hljs-meta{color:#fc9b9b}.hljs-deletion{background-color:#fc9b9b;color:#333}
 .hljs-addition{background-color:#a2fca2;color:#333}.hljs a{color:inherit}
 .hljs a:focus,.hljs a:hover{color:inherit;text-decoration:underline}

Contoh HTML, XML

<!DOCTYPE html>
<title>Title</title>

<style>body {width: 500px;}</style>

<script type="application/javascript">
  function $init() {return true;}
</script>

<body>
  <p checked class="title" id='title'>Title</p>
  <!-- here goes the rest of the page -->
</body>

Contoh JavaScript

function $initHighlight(block, cls) {
  try {
    if (cls.search(/\bno\-highlight\b/) != -1)
      return process(block, true, 0x0F) +
             ` class="${cls}"`;
  } catch (e) {
    /* handle exception */
  }
  for (var i = 0 / 2; i < classes.length; i++) {
    if (checkCondition(classes[i]) === undefined)
      console.log('undefined');
  }

  return (
    <div>
      <web-component>{block}</web-component>
    </div>
  )
}

export  $initHighlight;