JSFiddle - React, Tailwind, and code Playground

by Jonathan McGlone

HTML

<div class="pattern-details">
   <code>
       <h2>This is a heading two code</h2>
    </code>
</div>

JavaScript

$('code').html(function (i, code) {
     return code
         .replace(/</g, '&lt;')
         .replace(/>/g, '&gt;')
});