Enlighter.js TD
by neohiro79
HTML
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.0/styles/googlecode.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.0/highlight.min.js"></script>
<!DOCTYPE html>
<html>
<head>
</head>
<body onload="iniDone()">
<h1>Enlighter.js Testcases:</h1>
<b>HTML, CSS & JS:</b><br/><br />
<!-- html works for html only -->
<!--<pre data-enlighter-language="html">-->
<!-- generic works for all except html -->
<pre data-enlighter-language="generic">
<!-- this is a html comment -->
<!-- this is a html comment
across multiple lines
-->
<p>
This is a paragraph
</p>
<style>
/* this is a css and a js comment */
/* this is a css and js comment
across multiple lines
*/
html { display : block; }
</style>
<script>
// this is a javascript comment
/* this is a css and a js comment */
/* this is a css and js comment
across multiple lines
*/
function iniDone(){
console.log("and this is some javascript itself");
}
</script>
</pre>
</body>
</html>
CSS
/* https://github.com/EnlighterJS/EnlighterJS#themes */
/*! EnlighterJS Syntax Highlighter 3.4.0 | Mozilla Public License 2.0 | https://enlighterjs.org */
.enlighter-tooltip{z-index:100}.enlighter-default{font-family:"Source Code Pro","Liberation Mono","Courier New",Courier,monospace;font-size:12px;line-height:1.35em;overflow:hidden;white-space:pre-wrap;word-wrap:break-word;margin:0 0 20px 0;padding:0;position:relative;text-align:left;direction:ltr}.enlighter-default .enlighter-special:hover{background-color:#f4f8fc}.enlighter-default .enlighter-raw{display:none;min-width:100%;line-height:inherit;font-size:1em;font-family:inherit;margin:0;padding:0;white-space:pre-wrap;word-wrap:break-word;border:none;box-shadow:none}.enlighter-default:hover .enlighter-toolbar{display:block}.enlighter-default .enlighter-btn{display:inline-block;margin:0 5px 0 5px;padding:3px 5px 3px 5px;border:solid 1px #333;background-color:#f0f0f0;cursor:pointer;font-family:inherit}.enlighter-default .enlighter-toolbar...
JavaScript
/*! EnlighterJS Syntax Highlighter 3.4.0 | Mozilla Public License 2.0 | https://enlighterjs.org */
var EnlighterJS=function(e){"use strict";var c={indent:4,ampersandCleanup:!0,linehover:!0,rawcodeDbclick:!1,textOverflow:"break",collapse:!1,retainCssClasses:!1,cssClasses:"",toolbarOuter:"{BTN_TABS}",toolbarTop:"{BTN_RAW}{BTN_COPY}{BTN_WINDOW}{BTN_WEBSITE}",toolbarBottom:"{BTN_COLLAPSE}",linenumbers:!0,lineoffset:0,highlight:"",layout:"standard",language:"generic",theme:"enlighter",title:""};function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function g(e,t,r){return(g=l()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&o(i,r.prototype),i}).apply(null,arguments)}function u(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(r){var n=l();return function(){var e,t=s(r);return...