Sample dan CSS yang digunakan

CSS (Copy CSS ini ke Template)

.hljs{display:block;overflow-x:auto;padding:0.5em;background:#222}
.hljs,.hljs-subst{color:#aaa}
.hljs-section{color:#fff}
.hljs-comment,.hljs-quote,.hljs-meta{color:#444}
.hljs-string,.hljs-symbol,.hljs-bullet,.hljs-regexp{color:#ffcc33}
.hljs-number,.hljs-addition{color:#00cc66}
.hljs-built_in,.hljs-builtin-name,.hljs-literal,.hljs-type,.hljs-template-variable,.hljs-attribute,.hljs-link{color:#32aaee}
.hljs-keyword,.hljs-selector-tag,.hljs-name,.hljs-selector-id,.hljs-selector-class{color:#6644aa}
.hljs-title,.hljs-variable,.hljs-deletion,.hljs-template-tag{color:#bb1166}
.hljs-section,.hljs-doctag,.hljs-strong{font-weight:bold}
.hljs-emphasis{font-style:italic}

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;