Sample dan CSS yang digunakan

CSS (Copy CSS ini ke Template)

.hljs{display:block;overflow-x:auto;padding:.5em;background:#404040;color:#f0f0f0}
.hljs,.hljs-subst{color:#f0f0f0}
.hljs-comment{color:#b5b5b5;font-style:italic}
.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta-keyword,.hljs-name,.hljs-selector-tag{color:#f0f0f0;font-weight:700}
.hljs-string{color:#97bf0d}
.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-template-tag,.hljs-type{color:#f0f0f0}
.hljs-section,.hljs-title{color:#df471e}
.hljs-title>.hljs-built_in{color:#81bce9;font-weight:400}
.hljs-link,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#e2c696}
.hljs-built_in,.hljs-literal{color:#97bf0d;font-weight:700}
.hljs-addition,.hljs-bullet,.hljs-code{color:#397300}
.hljs-class{color:#ce9d4d;font-weight:700}
.hljs-meta{color:#1f7199}.hljs-meta-string{color:#4d99bf}
.hljs-emphasis{font-style:italic}
.hljs-strong{font-weight:700}

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;