Sample dan CSS yang digunakan

CSS (Copy CSS ini ke Template)

.hljs{display:block;overflow-x:auto;padding:0.5em;background:#eee;color:black}
.hljs-link,.hljs-emphasis,.hljs-attribute,.hljs-addition{color:#070}
.hljs-emphasis{font-style:italic}.hljs-strong,.hljs-string,.hljs-deletion{color:#d14}
.hljs-strong{font-weight:bold}.hljs-quote,.hljs-comment{color:#998;font-style:italic}
.hljs-section,.hljs-title{color:#900}.hljs-class .hljs-title,.hljs-type{color:#458}
.hljs-variable,.hljs-template-variable{color:#336699}.hljs-bullet{color:#997700}
.hljs-meta{color:#3344bb}.hljs-code,.hljs-number,.hljs-literal,.hljs-keyword,.hljs-selector-tag{color:#099}
.hljs-regexp{background-color:#fff0ff;color:#880088}
.hljs-symbol{color:#990073}
.hljs-tag,.hljs-name,.hljs-selector-id,.hljs-selector-class{color:#007700}

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;