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

Side by Side Diff: lib/src/prism/plugins/show-language/prism-show-language.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(){if(self.Prism){var e={csharp:"C#",cpp:"C++"};Prism.hooks.add("before -highlight",function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName) ){var i=e[a.language]||a.language;t.setAttribute("data-language",i)}})}}(); 1 !function(){if("undefined"!=typeof self&&self.Prism&&self.document){var e={css:" CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScri pt",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",aspnet :"ASP.NET (C#)",autoit:"AutoIt",autohotkey:"AutoHotkey",basic:"BASIC",csharp:"C# ",cpp:"C++",coffeescript:"CoffeeScript","css-extras":"CSS Extras",fsharp:"F#",gl sl:"GLSL",http:"HTTP",inform7:"Inform 7",latex:"LaTeX",lolcode:"LOLCODE",matlab: "MATLAB",mel:"MEL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C ",ocaml:"OCaml",php:"PHP","php-extras":"PHP Extras",powershell:"PowerShell",jsx: "React JSX",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sa ss (Scss)",sql:"SQL",typescript:"TypeScript",vhdl:"VHDL",vim:"vim",wiki:"Wiki ma rkup",yaml:"YAML"};Prism.hooks.add("before-highlight",function(a){var t=a.elemen t.parentNode;if(t&&/pre/i.test(t.nodeName)){var s=e[a.language]||a.language.subs tring(0,1).toUpperCase()+a.language.substring(1);t.setAttribute("data-language", s);var i,r,l=t.previousSibling;l&&/\s*\bprism-show-language\b\s*/.test(l.classNa me)&&l.firstChild&&/\s*\bprism-show-language-label\b\s*/.test(l.firstChild.class Name)?(r=l.firstChild,r.getAttribute("data-language")!==s&&(r.setAttribute("data -language",s),r.innerHTML=s)):(i=document.createElement("div"),r=document.create Element("div"),r.className="prism-show-language-label",r.setAttribute("data-lang uage",s),r.innerHTML=s,i.className="prism-show-language",i.appendChild(r),t.pare ntNode.insertBefore(i,t))}})}}();
OLDNEW
« no previous file with comments | « lib/src/prism/plugins/show-language/prism-show-language.min.css ('k') | lib/src/prism/plugins/wpd/prism-wpd.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698