Sample dan CSS yang digunakan

CSS (Copy CSS ini ke Template)

.hljs{display:block;overflow-x:auto;padding:0.5em;color:#000;background:#f8f8ff}
.hljs-comment,.hljs-quote{color:#408080;font-style:italic}.hljs-keyword,.hljs-selector-tag,.hljs-literal,.hljs-subst{color:#954121}
.hljs-number{color:#40a070}.hljs-string,.hljs-doctag{color:#219161}
.hljs-selector-id,.hljs-selector-class,.hljs-section,.hljs-type{color:#19469d}
.hljs-params{color:#00f}.hljs-title{color:#458;font-weight:bold}
.hljs-tag,.hljs-name,.hljs-attribute{color:#000080;font-weight:normal}
.hljs-variable,.hljs-template-variable{color:#008080}
.hljs-regexp,.hljs-link{color:#b68}
.hljs-symbol,.hljs-bullet{color:#990073}
.hljs-built_in,.hljs-builtin-name{color:#0086b3}
.hljs-meta{color:#999;font-weight:bold}
.hljs-deletion{background:#fdd}
.hljs-addition{background:#dfd}
.hljs-emphasis{font-style:italic}
.hljs-strong{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;