JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shCore.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shBrushJScript.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/styles/shCore.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/styles/shThemeEmacs.css">
<script src="https://cdn.rawgit.com/nomatteus/conway-game-of-life-js/master/gameoflife.js"></script>
<a href="https://github.com/nomatteus/conway-game-of-life-js">
Conways Game of Life ~ js-stylee! ~ by Matthew Ruten
</a>
<div id="code-block"></div>
CSS
body
{
background-color:#131313;
}
a:link,
a:visited
{
color: rgba(185, 176, 218, 0.78);
text-decoration: none;
}
a:hover,
a:focus
{
color: rgba(41, 129, 241, 0.78);
cursor: pointer;
cursor: hand;
text-decoration: underline;
}
#code-block
{
max-width:800px;
overflow:auto;
}
#code-block .syntaxhighlighter
{
margin:20px;
font-size:10px!important;
overflow:visible!important;
}
JavaScript
var strMod=GameOfLife.toString();
//real shenzi prettification lol
(strMod.indexOf(";var")>-1) && (strMod=strMod.replace(/;/g, ";\t\n"));
var nodeCtr=document.getElementById('code-block');
var nodeCodes=document.createElement("pre");
nodeCodes.classList.add("code-snippet");
nodeCtr.appendChild(nodeCodes);
nodeCodes.innerHTML="var GameOfLife="+strMod;
SyntaxHighlighter.highlight({brush: "js", "smart-tabs": true}, nodeCodes);