Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Side by Side Diff: lib/src/prism/plugins/file-highlight/prism-file-highlight.min.js

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 !function(){self.Prism&&self.document&&document.querySelector&&(self.Prism.fileH ighlight=function(){var e={js:"javascript",html:"markup",svg:"markup",xml:"marku p",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell"};Array.prototype.for Each&&Array.prototype.slice.call(document.querySelectorAll("pre[data-src]")).for Each(function(t){for(var r,a=t.getAttribute("data-src"),s=t,n=/\blang(?:uage)?-( ?!\*)(\w+)\b/i;s&&!n.test(s.className);)s=s.parentNode;if(s&&(r=(t.className.mat ch(n)||[,""])[1]),!r){var o=(a.match(/\.(\w+)$/)||[,""])[1];r=e[o]||o}var l=docu ment.createElement("code");l.className="language-"+r,t.textContent="",l.textCont ent="Loading…",t.appendChild(l);var i=new XMLHttpRequest;i.open("GET",a,!0),i.on readystatechange=function(){4==i.readyState&&(i.status<400&&i.responseText?(l.te xtContent=i.responseText,Prism.highlightElement(l)):l.textContent=i.status>=400? "✖ Error "+i.status+" while fetching file: "+i.statusText:"✖ Error: File does no t exist or is empty")},i.send(null)})},self.Prism.fileHighlight())}(); 1 !function(){"undefined"!=typeof self&&self.Prism&&self.document&&document.queryS elector&&(self.Prism.fileHighlight=function(){var e={js:"javascript",html:"marku p",svg:"markup",xml:"markup",py:"python",rb:"ruby",ps1:"powershell",psm1:"powers hell"};Array.prototype.forEach&&Array.prototype.slice.call(document.querySelecto rAll("pre[data-src]")).forEach(function(t){for(var r,a=t.getAttribute("data-src" ),s=t,n=/\blang(?:uage)?-(?!\*)(\w+)\b/i;s&&!n.test(s.className);)s=s.parentNode ;if(s&&(r=(t.className.match(n)||[,""])[1]),!r){var o=(a.match(/\.(\w+)$/)||[,"" ])[1];r=e[o]||o}var l=document.createElement("code");l.className="language-"+r,t .textContent="",l.textContent="Loading…",t.appendChild(l);var i=new XMLHttpReque st;i.open("GET",a,!0),i.onreadystatechange=function(){4==i.readyState&&(i.status <400&&i.responseText?(l.textContent=i.responseText,Prism.highlightElement(l)):l. textContent=i.status>=400?"✖ Error "+i.status+" while fetching file: "+i.statusT ext:"✖ Error: File does not exist or is empty")},i.send(null)})},self.Prism.file Highlight())}();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698