Sample dan CSS yang digunakan

CSS (Copy CSS ini ke Template)

.hljs{display:block;overflow-x:auto;padding:0.5em;background:#fbf1c7}
.hljs,.hljs-subst{color:#3c3836}.hljs-deletion,.hljs-formula,.hljs-keyword,.hljs-link,.hljs-selector-tag{color:#9d0006}
.hljs-built_in,.hljs-emphasis,.hljs-name,.hljs-quote,.hljs-strong,.hljs-title,.hljs-variable{color:#076678}
.hljs-attr,.hljs-params,.hljs-template-tag,.hljs-type{color:#b57614}
.hljs-builtin-name,.hljs-doctag,.hljs-literal,.hljs-number{color:#8f3f71}
.hljs-code,.hljs-meta,.hljs-regexp,.hljs-selector-id,.hljs-template-variable{color:#af3a03}
.hljs-addition,.hljs-meta-string,.hljs-section,.hljs-selector-attr,.hljs-selector-class,.hljs-string,.hljs-symbol{color:#79740e}
.hljs-attribute,.hljs-bullet,.hljs-class,.hljs-function,.hljs-function .hljs-keyword,.hljs-meta-keyword,.hljs-selector-pseudo,.hljs-tag{color:#427b58}
.hljs-comment{color:#928374}.hljs-link_label,.hljs-literal,.hljs-number{color:#8f3f71}
.hljs-comment,.hljs-emphasis{font-style:italic}
.hljs-section,.hljs-strong,.hljs-tag{font-weight:bold}

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;