Sample dan CSS yang digunakan

CSS (Copy CSS ini ke Template)

.hljs{display:block;overflow-x:auto;padding:0.5em;background:#fff;color:black}
.hljs-comment,.hljs-quote{color:#006a00}
.hljs-keyword,.hljs-selector-tag,.hljs-literal{color:#aa0d91}
.hljs-name{color:#008}
.hljs-variable,.hljs-template-variable{color:#660}
.hljs-string{color:#c41a16}.hljs-regexp,.hljs-link{color:#080}
.hljs-title,.hljs-tag,.hljs-symbol,.hljs-bullet,.hljs-number,.hljs-meta{color:#1c00cf}
.hljs-section,.hljs-class .hljs-title,.hljs-type,.hljs-attr,.hljs-built_in,.hljs-builtin-name,.hljs-params{color:#5c2699}
.hljs-attribute,.hljs-subst{color:#000}
.hljs-formula{background-color:#eee;font-style:italic}
.hljs-addition{background-color:#baeeba}
.hljs-deletion{background-color:#ffc8bd}
.hljs-selector-id,.hljs-selector-class{color:#9b703f}
.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;