You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
619 B
JavaScript

!function(){if(window.Prism){var e=document.createElement("header");String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+/g,"").replace(/\s+$/g,"")}),!("textContent"in e)&&"innerText"in e&&Object.defineProperty&&Object.defineProperty(Element.prototype,"textContent",{get:function(){return this.innerText},set:function(e){this.innerText=e}}),!document.addEventListener&&"textContent"in e&&setTimeout(Prism.highlightAll,10),e.innerHTML="\r\n",-1===e.textContent.indexOf("\n")&&Prism.hooks.add("after-highlight",function(e){e.element.innerHTML=e.highlightedCode.replace(/\r?\n/g,"<br>")})}}();