Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* adding a rake task to minify javascript

* adding prettyprint class in the code tag
  • Loading branch information...
commit a0530b76967ec52d9ce47516774ba8e4209a397d 1 parent c37ab66
@ananthakumaran authored
View
BIN  build/compiler.jar
Binary file not shown
View
2  jquery.wmd.js
@@ -3328,7 +3328,7 @@ var _DoCodeSpans = function(text) {
c = c.replace(/^([ \t]*)/g,""); // leading whitespace
c = c.replace(/[ \t]*$/g,""); // trailing whitespace
c = _EncodeCode(c);
- return m1+"<code>"+c+"</code>";
+ return m1+"<code class='prettyprint'>"+c+"</code>";
});
return text;
View
100 jquery.wmd.min.js
@@ -0,0 +1,100 @@
+(function(K){var I=0;K.fn.wmd=function(g){this.each(function(){var m=K.extend({},g||{},{preview:true});if(!m.button_bar){m.button_bar="wmd-button-bar-"+I;K("<div/>").attr("class","wmd-button-bar").attr("id",m.button_bar).insertBefore(this)}if(typeof m.preview=="boolean"&&m.preview){m.preview="wmd-preview-"+I;K("<div/>").attr("class","wmd-preview").attr("id",m.preview).insertAfter(this)}if(typeof m.output=="boolean"&&m.output){m.output="wmd-output-"+I;K("<div/>").attr("class","wmd-output").attr("id",
+m.output).insertAfter(this)}this.id=this.id||"wmd-input-"+I;m.input=this.id;window.console&&console.log(m);setup_wmd(m);I++})}})(jQuery);
+function setup_wmd(K){var I=I||{};K=K||top.wmd_options||{};I.wmdBase=function(){var g=I,m=top.document,T=top.RegExp,aa=top.navigator;g.Util={};g.Position={};g.Command={};g.Global={};g.buttons={};g.showdown=top.Attacklab&&top.Attacklab.showdown;var z=g.Util,ba=g.Position,s=g.Command,U=g.Global;U.isIE=/msie/.test(aa.userAgent.toLowerCase());U.isIE_5or6=/msie 6/.test(aa.userAgent.toLowerCase())||/msie 5/.test(aa.userAgent.toLowerCase());U.isIE_7plus=U.isIE&&!U.isIE_5or6;U.isOpera=/opera/.test(aa.userAgent.toLowerCase());
+U.isKonqueror=/konqueror/.test(aa.userAgent.toLowerCase());var ga=K.imageDialogText||"<p style='margin-top: 0px'><b>Enter the image URL.</b></p><p>You can also add a title, which will be displayed as a tool tip.</p><p>Example:<br />http://wmd-editor.com/images/cloud1.jpg \"Optional title\"</p>",ea=K.linkDialogText||"<p style='margin-top: 0px'><b>Enter the web address.</b></p><p>You can also add a title, which will be displayed as a tool tip.</p><p>Example:<br />http://wmd-editor.com/ \"Optional title\"</p>",
+da=K.helpLink||"http://wmd-editor.com/",$=K.helpHoverTitle||"WMD website",ha=K.helpTarget||"_blank";g.PanelCollection=function(){this.buttonBar=m.getElementById(K.button_bar||"wmd-button-bar");this.preview=m.getElementById(K.preview||"wmd-preview");this.output=m.getElementById(K.output||"wmd-output");this.input=m.getElementById(K.input||"wmd-input")};g.panels=undefined;g.ieCachedRange=null;g.ieRetardedClick=false;z.isVisible=function(a){return a.offsetWidth>0||a.offsetHeight>0};z.addEvent=function(a,
+c,e){a.attachEvent?a.attachEvent("on"+c,e):a.addEventListener(c,e,false)};z.removeEvent=function(a,c,e){a.detachEvent?a.detachEvent("on"+c,e):a.removeEventListener(c,e,false)};z.fixEolChars=function(a){a=a.replace(/\r\n/g,"\n");return a=a.replace(/\r/g,"\n")};z.extendRegExp=function(a,c,e){if(c===null||c===undefined)c="";if(e===null||e===undefined)e="";a=a.toString();var d="";d=a.match(/\/([gim]*)$/);d=d===null?d[0]:"";a=a.replace(/(^\/|\/[gim]*$)/g,"");a=c+a+e;return new RegExp(a,d)};z.createImage=
+function(a){a="images/"+a;var c=m.createElement("img");c.className="wmd-button";c.src=a;return c};z.prompt=function(a,c,e){var d,i,r;if(c===undefined)c="";var H=function(x){(x.charCode||x.keyCode)===27&&L(true)},L=function(x){z.removeEvent(m.body,"keydown",H);var k=r.value;if(x)k=null;else{k=k.replace("http://http://","http://");k=k.replace("http://https://","https://");k=k.replace("http://ftp://","ftp://");if(k.indexOf("http://")===-1&&k.indexOf("ftp://")===-1&&k.indexOf("https://")===-1)k="http://"+
+k}d.parentNode.removeChild(d);i.parentNode.removeChild(i);e(k);return false},R=function(){d=m.createElement("div");d.className="wmd-prompt-dialog";d.style.padding="10px;";d.style.position="fixed";d.style.width="400px";d.style.zIndex="1001";var x=m.createElement("div");x.innerHTML=a;x.style.padding="5px";d.appendChild(x);x=m.createElement("form");x.onsubmit=function(){return L(false)};style=x.style;style.padding="0";style.margin="0";style.cssFloat="left";style.width="100%";style.textAlign="center";
+style.position="relative";d.appendChild(x);r=m.createElement("input");r.type="text";r.value=c;style=r.style;style.display="block";style.width="80%";style.marginLeft=style.marginRight="auto";x.appendChild(r);var k=m.createElement("input");k.type="button";k.onclick=function(){return L(false)};k.value="OK";style=k.style;style.margin="10px";style.display="inline";style.width="7em";var n=m.createElement("input");n.type="button";n.onclick=function(){return L(true)};n.value="Cancel";style=n.style;style.margin=
+"10px";style.display="inline";style.width="7em";if(/mac/.test(aa.platform.toLowerCase())){x.appendChild(n);x.appendChild(k)}else{x.appendChild(k);x.appendChild(n)}z.addEvent(m.body,"keydown",H);d.style.top="50%";d.style.left="50%";d.style.display="block";if(U.isIE_5or6){d.style.position="absolute";d.style.top=m.documentElement.scrollTop+200+"px";d.style.left="50%"}m.body.appendChild(d);d.style.marginTop=-(ba.getHeight(d)/2)+"px";d.style.marginLeft=-(ba.getWidth(d)/2)+"px"};(function(){i=m.createElement("div");
+i.className="wmd-prompt-background";style=i.style;style.position="absolute";style.top="0";style.zIndex="1000";if(U.isKonqueror)style.backgroundColor="transparent";else if(U.isIE)style.filter="alpha(opacity=50)";else style.opacity="0.5";var x=ba.getPageSize();style.height=x[1]+"px";if(U.isIE){style.left=m.documentElement.scrollLeft;style.width=m.documentElement.clientWidth}else{style.left="0";style.width="100%"}m.body.appendChild(i)})();top.setTimeout(function(){R();var x=c.length;if(r.selectionStart!==
+undefined){r.selectionStart=0;r.selectionEnd=x}else if(r.createTextRange){var k=r.createTextRange();k.collapse(false);k.moveStart("character",-x);k.moveEnd("character",x);k.select()}r.focus()},0)};ba.getTop=function(a,c){var e=a.offsetTop;if(!c)for(;a=a.offsetParent;)e+=a.offsetTop;return e};ba.getHeight=function(a){return a.offsetHeight||a.scrollHeight};ba.getWidth=function(a){return a.offsetWidth||a.scrollWidth};ba.getPageSize=function(){var a,c,e,d;if(self.innerHeight&&self.scrollMaxY){a=m.body.scrollWidth;
+c=self.innerHeight+self.scrollMaxY}else if(m.body.scrollHeight>m.body.offsetHeight){a=m.body.scrollWidth;c=m.body.scrollHeight}else{a=m.body.offsetWidth;c=m.body.offsetHeight}if(self.innerHeight){e=self.innerWidth;d=self.innerHeight}else if(m.documentElement&&m.documentElement.clientHeight){e=m.documentElement.clientWidth;d=m.documentElement.clientHeight}else if(m.body){e=m.body.clientWidth;d=m.body.clientHeight}a=Math.max(a,e);c=Math.max(c,d);return[a,c,e,d]};g.inputPoller=function(a,c){var e=this,
+d=g.panels.input,i,r,H,L;this.tick=function(){if(z.isVisible(d)){if(d.selectionStart||d.selectionStart===0){var x=d.selectionStart,k=d.selectionEnd;if(x!=i||k!=r){i=x;r=k;if(H!=d.value){H=d.value;return true}}}return false}};var R=function(){z.isVisible(d)&&e.tick()&&a()};this.destroy=function(){top.clearInterval(L)};(function(){L=top.setInterval(R,c)})()};g.undoManager=function(a){var c=this,e=[],d=0,i="none",r,H,L,R,x=function(C,p){if(i!=C){i=C;p||n()}if(!U.isIE||i!="moving")L=top.setTimeout(k,
+1);else R=null},k=function(){R=new g.TextareaState;H.tick();L=undefined};this.setCommandMode=function(){i="command";n();L=top.setTimeout(k,0)};this.canUndo=function(){return d>1};this.canRedo=function(){if(e[d+1])return true;return false};this.undo=function(){if(c.canUndo())if(r){r.restore();r=null}else{e[d]=new g.TextareaState;e[--d].restore();a&&a()}i="none";g.panels.input.focus();k()};this.redo=function(){if(c.canRedo()){e[++d].restore();a&&a()}i="none";g.panels.input.focus();k()};var n=function(){var C=
+R||new g.TextareaState;if(!C)return false;if(i=="moving")r||(r=C);else{if(r){if(e[d-1].text!=r.text)e[d++]=r;r=null}e[d++]=C;e[d+1]=null;a&&a()}},M=function(C){var p=false;if(C.ctrlKey||C.metaKey)switch(String.fromCharCode(C.charCode||C.keyCode)){case "y":c.redo();p=true;break;case "z":C.shiftKey?c.redo():c.undo();p=true;break}if(p){C.preventDefault&&C.preventDefault();if(top.event)top.event.returnValue=false}},W=function(C){if(!C.ctrlKey&&!C.metaKey){C=C.keyCode;if(C>=33&&C<=40||C>=63232&&C<=63235)x("moving");
+else if(C==8||C==46||C==127)x("deleting");else if(C==13)x("newlines");else if(C==27)x("escape");else if((C<16||C>20)&&C!=91)x("typing")}},Z=function(){z.addEvent(g.panels.input,"keypress",function(p){if((p.ctrlKey||p.metaKey)&&(p.keyCode==89||p.keyCode==90))p.preventDefault()});var C=function(){if(U.isIE||R&&R.text!=g.panels.input.value)if(L==undefined){i="paste";n();k()}};H=new g.inputPoller(C,100);z.addEvent(g.panels.input,"keydown",M);z.addEvent(g.panels.input,"keydown",W);z.addEvent(g.panels.input,
+"mousedown",function(){x("moving")});g.panels.input.onpaste=C;g.panels.input.ondrop=C};this.destroy=function(){H&&H.destroy()};(function(){Z();k();n()})()};g.editor=function(a){a||(a=function(){});var c=g.panels.input,e=this,d,i=function(k){c.focus();if(k.textOp){d&&d.setCommandMode();var n=new g.TextareaState;if(!n)return;var M=n.getChunks(),W=function(){c.focus();M&&n.setChunks(M);n.restore();a()};k.textOp(M,W,true)||W()}k.execute&&k.execute(e)},r=function(){if(d){H(g.buttons["wmd-undo-button"],
+d.canUndo());H(g.buttons["wmd-redo-button"],d.canRedo())}},H=function(k,n){if(n){k.style.backgroundPosition=k.XShift+" 0px";k.onmouseover=function(){this.style.backgroundPosition=this.XShift+" -40px"};k.onmouseout=function(){this.style.backgroundPosition=this.XShift+" 0px"};if(U.isIE)k.onmousedown=function(){g.ieRetardedClick=true;g.ieCachedRange=document.selection.createRange()};if(!k.isHelp)k.onclick=function(){this.onmouseout&&this.onmouseout();i(this);return false}}else{k.style.backgroundPosition=
+k.XShift+" -20px";k.onmouseover=k.onmouseout=k.onclick=function(){}}},L=function(){function k(D,b,f){var l=document.createElement("li");g.buttons[D]=l;l.className="wmd-button "+D;l.XShift=C+"px";C-=20;if(b)l.title=b;if(f)l.textOp=f;return l}function n(D,b,f){D=k(D,b,f);H(D,true);Z.appendChild(D);return D}function M(){var D=document.createElement("li");D.className="wmd-spacer";Z.appendChild(D);return D}var W=document.getElementById(K.button_bar||"wmd-button-bar"),Z=document.createElement("ul");Z.className=
+"wmd-button-row";Z=W.appendChild(Z);var C=0;n("wmd-bold-button","Strong <strong> Ctrl+B",s.doBold);n("wmd-italic-button","Emphasis <em> Ctrl+I",s.doItalic);M();n("wmd-link-button","Hyperlink <a> Ctrl+L",function(D,b){return s.doLinkOrImage(D,b,false)});n("wmd-quote-button","Blockquote <blockquote> Ctrl+Q",s.doBlockquote);n("wmd-code-button","Code Sample <pre><code> Ctrl+K",s.doCode);n("wmd-image-button","Image <img> Ctrl+G",function(D,b){return s.doLinkOrImage(D,b,true)});M();n("wmd-olist-button",
+"Numbered List <ol> Ctrl+O",function(D,b,f){s.doList(D,b,true,f)});n("wmd-ulist-button","Bulleted List <ul> Ctrl+U",function(D,b,f){s.doList(D,b,false,f)});n("wmd-heading-button","Heading <h1>/<h2> Ctrl+H",s.doHeading);n("wmd-hr-button","Horizontal Rule <hr> Ctrl+R",s.doHorizontalRule);M();n("wmd-undo-button","Undo - Ctrl+Z").execute=function(D){D.undo()};W=n("wmd-redo-button","Redo - Ctrl+Y");W.title=/win/.test(aa.platform.toLowerCase())?"Redo - Ctrl+Y":"Redo - Ctrl+Shift+Z";W.execute=function(D){D.redo()};
+W=k("wmd-help-button");W.isHelp=true;H(W,true);Z.appendChild(W);var p=document.createElement("a");p.href=da;p.target=ha;p.title=$;W.appendChild(p);r()},R=function(){if(/\?noundo/.test(m.location.href))g.nativeUndo=true;g.nativeUndo||(d=new g.undoManager(function(){a();r()}));L();var k="keydown";if(U.isOpera)k="keypress";z.addEvent(c,k,function(M){if(M.ctrlKey||M.metaKey){switch(String.fromCharCode(M.charCode||M.keyCode).toLowerCase()){case "b":i(g.buttons["wmd-bold-button"]);break;case "i":i(g.buttons["wmd-italic-button"]);
+break;case "l":i(g.buttons["wmd-link-button"]);break;case "q":i(g.buttons["wmd-quote-button"]);break;case "k":i(g.buttons["wmd-code-button"]);break;case "g":i(g.buttons["wmd-image-button"]);break;case "o":i(g.buttons["wmd-olist-button"]);break;case "u":i(g.buttons["wmd-ulist-button"]);break;case "h":i(g.buttons["wmd-heading-button"]);break;case "r":i(g.buttons["wmd-hr-button"]);break;case "y":i(g.buttons["wmd-redo-button"]);break;case "z":M.shiftKey?i(g.buttons["wmd-redo-button"]):i(g.buttons["wmd-undo-button"]);
+break;default:return}M.preventDefault&&M.preventDefault();if(top.event)top.event.returnValue=false}});z.addEvent(c,"keyup",function(M){if(!M.shiftKey&&!M.ctrlKey&&!M.metaKey)if((M.charCode||M.keyCode)===13){fakeButton={};fakeButton.textOp=s.doAutoindent;i(fakeButton)}});U.isIE&&z.addEvent(c,"keydown",function(M){if(M.keyCode===27)return false});if(c.form){var n=c.form.onsubmit;c.form.onsubmit=function(){x();if(n)return n.apply(this,arguments)}}},x=function(){if(g.showdown)var k=new g.showdown.converter;
+var n=c.value,M=function(){c.value=n};if(!/markdown/.test(g.wmd_env.output_format.toLowerCase()))if(k){c.value=k.makeHtml(n);top.setTimeout(M,0)}return true};this.undo=function(){d&&d.undo()};this.redo=function(){d&&d.redo()};this.destroy=function(){d&&d.destroy();(void 0).parentNode&&(void 0).parentNode.removeChild(void 0);if(c)c.style.marginTop="";top.clearInterval(void 0)};(function(){R()})()};g.TextareaState=function(){var a=this,c=g.panels.input;this.init=function(){if(z.isVisible(c)){this.setInputAreaSelectionStartEnd();
+this.scrollTop=c.scrollTop;if(!this.text&&c.selectionStart||c.selectionStart===0)this.text=c.value}};this.setInputAreaSelection=function(){if(z.isVisible(c))if(c.selectionStart!==undefined&&!U.isOpera){c.focus();c.selectionStart=a.start;c.selectionEnd=a.end;c.scrollTop=a.scrollTop}else if(m.selection)if(!(m.activeElement&&m.activeElement!==c)){c.focus();var e=c.createTextRange();e.moveStart("character",-c.value.length);e.moveEnd("character",-c.value.length);e.moveEnd("character",a.end);e.moveStart("character",
+a.start);e.select()}};this.setInputAreaSelectionStartEnd=function(){if(c.selectionStart||c.selectionStart===0){a.start=c.selectionStart;a.end=c.selectionEnd}else if(m.selection){a.text=z.fixEolChars(c.value);var e;if(g.ieRetardedClick&&g.ieCachedRange){e=g.ieCachedRange;g.ieRetardedClick=false}else e=m.selection.createRange();var d=z.fixEolChars(e.text),i="\u0007"+d+"\u0007";e.text=i;var r=z.fixEolChars(c.value);e.moveStart("character",-i.length);e.text=d;a.start=r.indexOf("\u0007");a.end=r.lastIndexOf("\u0007")-
+1;if(i=a.text.length-z.fixEolChars(c.value).length){for(e.moveStart("character",-d.length);i--;){d+="\n";a.end+=1}e.text=d}this.setInputAreaSelection()}};this.restore=function(){if(a.text!=undefined&&a.text!=c.value)c.value=a.text;this.setInputAreaSelection();c.scrollTop=a.scrollTop};this.getChunks=function(){var e=new g.Chunks;e.before=z.fixEolChars(a.text.substring(0,a.start));e.startTag="";e.selection=z.fixEolChars(a.text.substring(a.start,a.end));e.endTag="";e.after=z.fixEolChars(a.text.substring(a.end));
+e.scrollTop=a.scrollTop;return e};this.setChunks=function(e){e.before+=e.startTag;e.after=e.endTag+e.after;if(U.isOpera){e.before=e.before.replace(/\n/g,"\r\n");e.selection=e.selection.replace(/\n/g,"\r\n");e.after=e.after.replace(/\n/g,"\r\n")}this.start=e.before.length;this.end=e.before.length+e.selection.length;this.text=e.before+e.selection+e.after;this.scrollTop=e.scrollTop};this.init()};g.Chunks=function(){};g.Chunks.prototype.findTags=function(a,c){var e=this,d;if(a){d=z.extendRegExp(a,"",
+"$");this.before=this.before.replace(d,function(i){e.startTag+=i;return""});d=z.extendRegExp(a,"^","");this.selection=this.selection.replace(d,function(i){e.startTag+=i;return""})}if(c){d=z.extendRegExp(c,"","$");this.selection=this.selection.replace(d,function(i){e.endTag=i+e.endTag;return""});d=z.extendRegExp(c,"^","");this.after=this.after.replace(d,function(i){e.endTag=i+e.endTag;return""})}};g.Chunks.prototype.trimWhitespace=function(a){this.selection=this.selection.replace(/^(\s*)/,"");a||(this.before+=
+T.$1);this.selection=this.selection.replace(/(\s*)$/,"");if(!a)this.after=T.$1+this.after};g.Chunks.prototype.addBlankLines=function(a,c,e){if(a===undefined)a=1;if(c===undefined)c=1;a++;c++;var d,i;this.selection=this.selection.replace(/(^\n*)/,"");this.startTag+=T.$1;this.selection=this.selection.replace(/(\n*$)/,"");this.endTag+=T.$1;this.startTag=this.startTag.replace(/(^\n*)/,"");this.before+=T.$1;this.endTag=this.endTag.replace(/(\n*$)/,"");this.after+=T.$1;if(this.before){for(d=i="";a--;){d+=
+"\\n?";i+="\n"}if(e)d="\\n*";this.before=this.before.replace(new T(d+"$",""),i)}if(this.after){for(d=i="";c--;){d+="\\n?";i+="\n"}if(e)d="\\n*";this.after=this.after.replace(new T(d,""),i)}};s.prefixes="(?:\\s{4,}|\\s*>|\\s*-\\s+|\\s*\\d+\\.|=|\\+|-|_|\\*|#|\\s*\\[[^\n]]+\\]:)";s.unwrap=function(a){var c=new T("([^\\n])\\n(?!(\\n|"+s.prefixes+"))","g");a.selection=a.selection.replace(c,"$1 $2")};s.wrap=function(a,c){s.unwrap(a);c=new T("(.{1,"+c+"})( +|$\\n?)","gm");a.selection=a.selection.replace(c,
+function(e,d){if((new T("^"+s.prefixes,"")).test(e))return e;return d+"\n"});a.selection=a.selection.replace(/\s+$/,"")};s.doBold=function(a){return s.doBorI(a,2,"strong text")};s.doItalic=function(a){return s.doBorI(a,1,"emphasized text")};s.doBorI=function(a,c,e){a.trimWhitespace();a.selection=a.selection.replace(/\n{2,}/g,"\n");a.before.search(/(\**$)/);var d=T.$1;a.after.search(/(^\**)/);var i=T.$1;d=Math.min(d.length,i.length);if(d>=c&&(d!=2||c!=1)){a.before=a.before.replace(T("[*]{"+c+"}$",
+""),"");a.after=a.after.replace(T("^[*]{"+c+"}",""),"")}else if(!a.selection&&i){a.after=a.after.replace(/^([*_]*)/,"");a.before=a.before.replace(/(\s?)$/,"");a.before=a.before+i+T.$1}else{if(!a.selection&&!i)a.selection=e;c=c<=1?"*":"**";a.before+=c;a.after=c+a.after}};s.stripLinkDefs=function(a,c){return a=a.replace(/^[ ]{0,3}\[(\d+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|$)/gm,function(e,d,i,r,H){c[d]=e.replace(/\s*$/,"");if(r){c[d]=e.replace(/["(](.+?)[")]$/,
+"");return r+H}return""})};s.addLinkDef=function(a,c){var e=0,d={};a.before=s.stripLinkDefs(a.before,d);a.selection=s.stripLinkDefs(a.selection,d);a.after=s.stripLinkDefs(a.after,d);var i="",r=/(\[(?:\[[^\]]*\]|[^\[\]])*\][ ]?(?:\n[ ]*)?\[)(\d+)(\])/g,H=function(R){e++;R=R.replace(/^[ ]{0,3}\[(\d+)\]:/," ["+e+"]:");i+="\n"+R},L=function(R,x,k,n){if(d[k]){H(d[k]);return x+e+n}return R};a.before=a.before.replace(r,L);if(c)H(c);else a.selection=a.selection.replace(r,L);c=e;a.after=a.after.replace(r,
+L);if(a.after)a.after=a.after.replace(/\n*$/,"");if(!a.after)a.selection=a.selection.replace(/\n*$/,"");a.after+="\n\n"+i;return c};s.doLinkOrImage=function(a,c,e){a.trimWhitespace();a.findTags(/\s*!?\[/,/\][ ]?(?:\n[ ]*)?(\[.*?\])?/);if(a.endTag.length>1){a.startTag=a.startTag.replace(/!?\[/,"");a.endTag="";s.addLinkDef(a,null)}else if(/\n\n/.test(a.selection))s.addLinkDef(a,null);else{var d=function(i){if(i!==null){a.startTag=a.endTag="";i=s.addLinkDef(a," [999]: "+i);a.startTag=e?"![":"[";a.endTag=
+"]["+i+"]";if(!a.selection)a.selection=e?"alt text":"link text"}c()};e?z.prompt(ga,"http://",d):z.prompt(ea,"http://",d);return true}};z.makeAPI=function(){g.wmd={};g.wmd.editor=g.editor;g.wmd.previewManager=g.previewManager};z.startEditor=function(){if(g.wmd_env.autostart===false)z.makeAPI();else{var a,c=function(){g.panels=new g.PanelCollection;a=new g.previewManager;new g.editor(a.refresh);a.refresh(true)};K.isAjax?c():z.addEvent(top,"load",c)}};g.previewManager=function(){var a=this,c,e,d,i,r,
+H,L="delayed",R=function(p,D){z.addEvent(p,"input",D);p.onpaste=D;p.ondrop=D;z.addEvent(p,"keypress",D);z.addEvent(p,"keydown",D);e=new g.inputPoller(D,500)},x=function(){var p=0;if(top.innerHeight)p=top.pageYOffset;else if(m.documentElement&&m.documentElement.scrollTop)p=m.documentElement.scrollTop;else if(m.body)p=m.body.scrollTop;return p},k=function(){if(g.panels.preview||g.panels.output){var p=g.panels.input.value;if(!(p&&p==r)){r=p;var D=(new Date).getTime();if(!c&&g.showdown)c=new g.showdown.converter;
+if(c)p=c.makeHtml(p);i=(new Date).getTime()-D;C(p);H=p}}},n=function(){if(d){top.clearTimeout(d);d=undefined}if(L!=="manual"){var p=0;if(L==="delayed")p=i;if(p>3E3)p=3E3;d=top.setTimeout(k,p)}},M=function(p){if(p.scrollHeight<=p.clientHeight)return 1;return p.scrollTop/(p.scrollHeight-p.clientHeight)},W=function(){if(g.panels.preview)g.panels.preview.scrollTop=(g.panels.preview.scrollHeight-g.panels.preview.clientHeight)*M(g.panels.preview);if(g.panels.output)g.panels.output.scrollTop=(g.panels.output.scrollHeight-
+g.panels.output.clientHeight)*M(g.panels.output)};this.refresh=function(p){if(p){r="";k()}else n()};this.processingTime=function(){return i};this.output=function(){return H};this.setUpdateMode=function(p){L=p;a.refresh()};var Z=true,C=function(p){var D=ba.getTop(g.panels.input)-x();if(g.panels.output)if(g.panels.output.value!==undefined){g.panels.output.value=p;g.panels.output.readOnly=true}else{var b=p.replace(/&/g,"&amp;");b=b.replace(/</g,"&lt;");g.panels.output.innerHTML="<pre><code class='prettyprint'>"+
+b+"</code></pre>"}if(g.panels.preview){g.panels.preview.innerHTML=p;prettyPrint()}W();if(Z)Z=false;else{var f=ba.getTop(g.panels.input)-x();U.isIE?top.setTimeout(function(){top.scrollBy(0,f-D)},0):top.scrollBy(0,f-D)}};this.destroy=function(){e&&e.destroy()};(function(){R(g.panels.input,n);k();if(g.panels.preview)g.panels.preview.scrollTop=0;if(g.panels.output)g.panels.output.scrollTop=0})()};s.doAutoindent=function(a,c,e){a.before=a.before.replace(/(\n|^)[ ]{0,3}([*+-]|\d+[.])[ \t]*\n$/,"\n\n");
+a.before=a.before.replace(/(\n|^)[ ]{0,3}>[ \t]*\n$/,"\n\n");a.before=a.before.replace(/(\n|^)[ \t]+\n$/,"\n\n");e=false;/(\n|^)[ ]{0,3}([*+-])[ \t]+.*\n$/.test(a.before)&&s.doList&&s.doList(a,c,false,true);/(\n|^)[ ]{0,3}(\d+[.])[ \t]+.*\n$/.test(a.before)&&s.doList&&s.doList(a,c,true,true);/(\n|^)[ ]{0,3}>[ \t]+.*\n$/.test(a.before)&&s.doBlockquote&&s.doBlockquote(a,c,e);/(\n|^)(\t|[ ]{4,}).*\n$/.test(a.before)&&s.doCode&&s.doCode(a,c,e)};s.doBlockquote=function(a,c,e){a.selection=a.selection.replace(/^(\n*)([^\r]+?)(\n*)$/,
+function(d,i,r,H){a.before+=i;a.after=H+a.after;return r});a.before=a.before.replace(/(>[ \t]*)$/,function(d,i){a.selection=i+a.selection;return""});c=e?"Blockquote":"";a.selection=a.selection.replace(/^(\s|>)+$/,"");a.selection=a.selection||c;if(a.before)a.before=a.before.replace(/\n?$/,"\n");if(a.after)a.after=a.after.replace(/^\n?/,"\n");a.before=a.before.replace(/(((\n|^)(\n[ \t]*)*>(.+\n)*.*)+(\n[ \t]*)*$)/,function(d){a.startTag=d;return""});a.after=a.after.replace(/^(((\n|^)(\n[ \t]*)*>(.+\n)*.*)+(\n[ \t]*)*)/,
+function(d){a.endTag=d;return""});c=function(d){var i=d?"> ":"";if(a.startTag)a.startTag=a.startTag.replace(/\n((>|\s)*)\n$/,function(r,H){return"\n"+H.replace(/^[ ]{0,3}>?[ \t]*$/gm,i)+"\n"});if(a.endTag)a.endTag=a.endTag.replace(/^\n((>|\s)*)\n/,function(r,H){return"\n"+H.replace(/^[ ]{0,3}>?[ \t]*$/gm,i)+"\n"})};if(/^(?![ ]{0,3}>)/m.test(a.selection)){s.wrap(a,g.wmd_env.lineLength-2);a.selection=a.selection.replace(/^/gm,"> ");c(true);a.addBlankLines()}else{a.selection=a.selection.replace(/^[ ]{0,3}> ?/gm,
+"");s.unwrap(a);c(false);if(!/^(\n|^)[ ]{0,3}>/.test(a.selection)&&a.startTag)a.startTag=a.startTag.replace(/\n{0,2}$/,"\n\n");if(!/(\n|^)[ ]{0,3}>.*$/.test(a.selection)&&a.endTag)a.endTag=a.endTag.replace(/^\n{0,2}/,"\n\n")}if(!/\n/.test(a.selection))a.selection=a.selection.replace(/^(> *)/,function(d,i){a.startTag+=i;return""})};s.doCode=function(a,c,e){c=/\S[ ]*$/.test(a.before);if(!/^[ ]*\S/.test(a.after)&&!c||/\n/.test(a.selection)){a.before=a.before.replace(/[ ]{4}$/,function(i){a.selection=
+i+a.selection;return""});var d=c=1;if(/\n(\t|[ ]{4,}).*\n$/.test(a.before)||a.after==="")c=0;if(/^\n(\t|[ ]{4,})/.test(a.after))d=0;a.addBlankLines(c,d);if(a.selection)a.selection=/^[ ]{0,3}\S/m.test(a.selection)?a.selection.replace(/^/gm," "):a.selection.replace(/^[ ]{4}/gm,"");else{a.startTag=" ";a.selection=e?"enter code here":""}}else{a.trimWhitespace();a.findTags(/`/,/`/);if(!a.startTag&&!a.endTag){a.startTag=a.endTag="`";if(!a.selection)a.selection=e?"enter code here":""}else if(a.endTag&&
+!a.startTag){a.before+=a.endTag;a.endTag=""}else a.startTag=a.endTag=""}};s.doList=function(a,c,e,d){c=/^\n*(([ ]{0,3}([*+-]|\d+[.])[ \t]+.*)(\n.+|\n{2,}([*+-].*|\d+[.])[ \t]+.*|\n{2,}[ \t]+\S.*)*)\n*/;var i="-",r=1,H=function(){var n;if(e){n=" "+r+". ";r++}else n=" "+i+" ";return n},L=function(n){if(e===undefined)e=/^\s*\d/.test(n);return n=n.replace(/^[ ]{0,3}([*+-]|\d+[.])\s/gm,function(){return H()})};a.findTags(/(\n|^)*[ ]{0,3}([*+-]|\d+[.])\s+/,null);if(a.before&&!/\n$/.test(a.before)&&!/^\n/.test(a.startTag)){a.before+=
+a.startTag;a.startTag=""}if(a.startTag){var R=/\d+[.]/.test(a.startTag);a.startTag="";a.selection=a.selection.replace(/\n[ ]{4}/g,"\n");s.unwrap(a);a.addBlankLines();if(R)a.after=a.after.replace(c,L);if(e==R)return}var x=1;a.before=a.before.replace(/(\n|^)(([ ]{0,3}([*+-]|\d+[.])[ \t]+.*)(\n.+|\n{2,}([*+-].*|\d+[.])[ \t]+.*|\n{2,}[ \t]+\S.*)*)\n*$/,function(n){if(/^\s*([*+-])/.test(n))i=T.$1;x=/[^\n]\n\n[^\n]/.test(n)?1:0;return L(n)});if(!a.selection)a.selection=d?"List item":" ";d=H();var k=1;a.after=
+a.after.replace(c,function(n){k=/[^\n]\n\n[^\n]/.test(n)?1:0;return L(n)});a.trimWhitespace(true);a.addBlankLines(x,k,true);a.startTag=d;d=d.replace(/./g," ");s.wrap(a,g.wmd_env.lineLength-d.length);a.selection=a.selection.replace(/\n/g,"\n"+d)};s.doHeading=function(a){a.selection=a.selection.replace(/\s+/g," ");a.selection=a.selection.replace(/(^\s+|\s+$)/g,"");if(a.selection){var c=0;a.findTags(/#+[ ]*/,/[ ]*#+/);if(/#+/.test(a.startTag))c=T.lastMatch.length;a.startTag=a.endTag="";a.findTags(null,
+/\s?(-+|=+)/);if(/=+/.test(a.endTag))c=1;if(/-+/.test(a.endTag))c=2;a.startTag=a.endTag="";a.addBlankLines(1,1);c=c==0?2:c-1;if(c>0){c=c>=2?"-":"=";var e=a.selection.length;if(e>g.wmd_env.lineLength)e=g.wmd_env.lineLength;for(a.endTag="\n";e--;)a.endTag+=c}}else{a.startTag="## ";a.selection="Heading";a.endTag=" ##"}};s.doHorizontalRule=function(a){a.startTag="----------\n";a.selection="";a.addBlankLines(2,1,true)}};I.wmd_env={};I.account_options={};I.wmd_defaults={version:2,output_format:"markdown",
+lineLength:40,delayLoad:false};if(!I.wmd){I.wmd=function(){I.loadEnv=function(){var g=function(m){if(m)for(var T in m)I.wmd_env[T]=m[T]};g(I.wmd_defaults);g(I.account_options);g(K);I.full=true;I.wmd_env.buttons=I.wmd_env.buttons||"bold italic link blockquote code image ol ul heading hr"};I.loadEnv()};I.wmd();I.wmdBase();I.Util.startEditor()}}var Attacklab=Attacklab||{};Attacklab.showdown=Attacklab.showdown||{};
+Attacklab.showdown.converter=function(){var K,I,g,m=0;this.makeHtml=function(b){K=[];I=[];g=[];b=b.replace(/<\S[^><]*>/g,"");b=b.replace(/~/g,"~T");b=b.replace(/\$/g,"~D");b=b.replace(/\r\n/g,"\n");b=b.replace(/\r/g,"\n");b="\n\n"+b+"\n\n";b=C(b);b=b.replace(/^[ \t]+$/mg,"");b=aa(b);b=T(b);b=ba(b);b=W(b);b=b.replace(/~D/g,"$$");b=b.replace(/~T/g,"~");b=b.replace(/https?\:\/\/[^"\s\<\>]*[^.,;'">\:\s\<\>\)\]\!]/g,function(f){var l=RegExp.rightContext;if(RegExp.leftContext.match(/<[^>]+$/)&&l.match(/^[^>]*>/))return f;
+return"<a href='"+f+"'>"+f+"</a>"});return b=b.replace(/[a-z0-9_\-+=.]+@[a-z0-9\-]+(\.[a-z0-9-]+)+/ig,function(f){return"<a href='mailto:"+f+"'>"+f+"</a>"})};var T=function(b){return b=b.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+)/gm,function(f,l,q,B,ca){l=l.toLowerCase();K[l]=x(q);if(B)return B+ca;else if(ca)I[l]=ca.replace(/"/g,"&quot;");return""})},aa=function(b){b=b.replace(/\n/g,"\n\n");b=b.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm,
+z);b=b.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\b[^\r]*?.*<\/\2>[ \t]*(?=\n+)\n)/gm,z);b=b.replace(/(\n[ ]{0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,z);b=b.replace(/(\n\n[ ]{0,3}<!(--[^\r]*?--\s*)+>[ \t]*(?=\n{2,}))/g,z);b=b.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,z);return b=b.replace(/\n\n/g,"\n")},z=function(b,f){b=f;b=b.replace(/\n\n/g,"\n");b=b.replace(/^\n/,"");b=b.replace(/\n+$/g,"");return b="\n\n~K"+
+(g.push(b)-1)+"K\n\n"},ba=function(b){b=ha(b);var f=d("<hr />");b=b.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm,f);b=b.replace(/^[ ]{0,2}([ ]?\-[ ]?){3,}[ \t]*$/gm,f);b=b.replace(/^[ ]{0,2}([ ]?\_[ ]?){3,}[ \t]*$/gm,f);b=c(b);b=e(b);b=L(b);b=aa(b);return b=R(b)},s=function(b){b=i(b);b=U(b);b=k(b);b=da(b);b=ga(b);b=n(b);b=x(b);b=H(b);return b=b.replace(/ +\n/g," <br />\n")},U=function(b){return b=b.replace(/(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|<!(--.*?--\s*)+>)/gi,function(f){f=f.replace(/(.)<\/?code>(?=.)/g,
+"$1`");return f=p(f,"\\`*_")})},ga=function(b){b=b.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,ea);b=b.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()<?(.*?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,ea);return b=b.replace(/(\[([^\[\]]+)\])()()()()()/g,ea)},ea=function(b,f,l,q,B,ca,ja,V){if(V==undefined)V="";b=q.toLowerCase();B=B;V=V;if(B==""){if(b=="")b=l.toLowerCase().replace(/ ?\n/g," ");if(K[b]!=undefined){B=K[b];if(I[b]!=undefined)V=I[b]}else if(f.search(/\(\s*\)$/m)>
+-1)B="";else return f}B=p(B,"*_");f='<a href="'+B+'"';if(V!=""){V=V.replace(/"/g,"&quot;");V=p(V,"*_");f+=' title="'+V+'"'}f+=">"+l+"</a>";return f},da=function(b){b=b.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,$);return b=b.replace(/(!\[(.*?)\]\s?\([ \t]*()<?(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,$)},$=function(b,f,l,q,B,ca,ja,V){b=l;q=q.toLowerCase();B=B;(V=V)||(V="");if(B==""){if(q=="")q=b.toLowerCase().replace(/ ?\n/g," ");if(K[q]!=undefined){B=K[q];if(I[q]!=undefined)V=I[q]}else return f}b=
+b.replace(/"/g,"&quot;");B=p(B,"*_");f='<img src="'+B+'" alt="'+b+'"';V=V.replace(/"/g,"&quot;");V=p(V,"*_");f+=' title="'+V+'"';f+=" />";return f},ha=function(b){b=b.replace(/^(.+)[ \t]*\n=+[ \t]*\n+/gm,function(f,l){return d("<h1>"+s(l)+"</h1>")});b=b.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm,function(f,l){return d("<h2>"+s(l)+"</h2>")});return b=b.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm,function(f,l,q){f=l.length;return d("<h"+f+">"+s(q)+"</h"+f+">")})},a,c=function(b){b+="~0";var f=/^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;
+if(m)b=b.replace(f,function(l,q,B){l=q;B=B.search(/[*+-]/g)>-1?"ul":"ol";l=l.replace(/\n{2,}/g,"\n\n\n");l=a(l);l=l.replace(/\s+$/,"");return l="<"+B+">"+l+"</"+B+">\n"});else{f=/(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g;b=b.replace(f,function(l,q,B,ca){l=B;ca=ca.search(/[*+-]/g)>-1?"ul":"ol";l=l.replace(/\n{2,}/g,"\n\n\n");l=a(l);return l=q+"<"+ca+">\n"+l+"</"+ca+">\n"})}return b=b.replace(/~0/,"")};a=function(b){m++;b=b.replace(/\n{2,}$/,
+"\n");b+="~0";b=b.replace(/(\n)?(^[ \t]*)([*+-]|\d+[.])[ \t]+([^\r]+?(\n{1,2}))(?=\n*(~0|\2([*+-]|\d+[.])[ \t]+))/gm,function(f,l,q,B,ca){f=ca;if(l||f.search(/\n{2,}/)>-1)f=ba(Z(f));else{f=c(Z(f));f=f.replace(/\n$/,"");f=s(f)}return"<li>"+f+"</li>\n"});b=b.replace(/~0/g,"");m--;return b};var e=function(b){b+="~0";b=b.replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g,function(f,l,q){f=l;f=r(Z(f));f=C(f);f=f.replace(/^\n+/g,"");f=f.replace(/\n+$/g,"");f="<pre><code class='prettyprint'>"+
+f+"\n</code></pre>";return d(f)+q});return b=b.replace(/~0/,"")},d=function(b){b=b.replace(/(^\n+|\n+$)/g,"");return"\n\n~K"+(g.push(b)-1)+"K\n\n"},i=function(b){return b=b.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(f,l,q,B){f=B;f=f.replace(/^([ \t]*)/g,"");f=f.replace(/[ \t]*$/g,"");f=r(f);return l+"<code class='prettyprint'>"+f+"</code>"})},r=function(b){b=b.replace(/&/g,"&amp;");b=b.replace(/</g,"&lt;");b=b.replace(/>/g,"&gt;");return b=p(b,"*_{}[]\\",false)},H=function(b){b=b.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g,
+"<strong>$2</strong>");b=b.replace(/(\w)_(\w)/g,"$1~E95E$2");return b=b.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g,"<em>$2</em>")},L=function(b){return b=b.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm,function(f,l){f=l;f=f.replace(/^[ \t]*>[ \t]?/gm,"~0");f=f.replace(/~0/g,"");f=f.replace(/^[ \t]+$/gm,"");f=ba(f);f=f.replace(/(^|\n)/g,"$1 ");f=f.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm,function(q,B){q=B;q=q.replace(/^ /mg,"~0");return q=q.replace(/~0/g,"")});return d("<blockquote>\n"+f+"\n</blockquote>")})},
+R=function(b){b=b.replace(/^\n+/g,"");b=b.replace(/\n+$/g,"");var f=b.split(/\n{2,}/g);b=[];for(var l=f.length,q=0;q<l;q++){var B=f[q];if(B.search(/~K(\d+)K/g)>=0)b.push(B);else if(B.search(/\S/)>=0){B=s(B);B=B.replace(/\n/g,"<br />");B=B.replace(/^([ \t]*)/g,"<p>");B+="</p>";b.push(B)}}l=b.length;for(q=0;q<l;q++)for(;b[q].search(/~K(\d+)K/)>=0;){f=g[RegExp.$1];f=f.replace(/\$/g,"$$$$");b[q]=b[q].replace(/~K\d+K/,f)}return b.join("\n\n")},x=function(b){b=b.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,
+"&amp;");return b=b.replace(/<(?![a-z\/?\$!])/gi,"&lt;")},k=function(b){b=b.replace(/\\(\\)/g,D);return b=b.replace(/\\([`*_{}\[\]()>#+-.!])/g,D)},n=function(b){b=b.replace(/<((https?|ftp|dict):[^'">\s]+)>/gi,'<a href="$1">$1</a>');return b=b.replace(/<(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,function(f,l){return M(W(l))})},M=function(b){function f(q){q=q.charCodeAt(0);return"0123456789ABCDEF".charAt(q>>4)+"0123456789ABCDEF".charAt(q&15)}var l=[function(q){return"&#"+q.charCodeAt(0)+
+";"},function(q){return"&#x"+f(q)+";"},function(q){return q}];b="mailto:"+b;b=b.replace(/./g,function(q){if(q=="@")q=l[Math.floor(Math.random()*2)](q);else if(q!=":"){var B=Math.random();q=B>0.9?l[2](q):B>0.45?l[1](q):l[0](q)}return q});b='<a href="'+b+'">'+b+"</a>";return b=b.replace(/">.+:/g,'">')},W=function(b){return b=b.replace(/~E(\d+)E/g,function(f,l){f=parseInt(l);return String.fromCharCode(f)})},Z=function(b){b=b.replace(/^(\t|[ ]{1,4})/gm,"~0");return b=b.replace(/~0/g,"")},C=function(b){b=
+b.replace(/\t(?=\t)/g," ");b=b.replace(/\t/g,"~A~B");b=b.replace(/~B(.+?)~A/g,function(f,l){f=l;l=4-f.length%4;for(var q=0;q<l;q++)f+=" ";return f});b=b.replace(/~A/g," ");return b=b.replace(/~B/g,"")},p=function(b,f,l){f="(["+f.replace(/([\[\]\\])/g,"\\$1")+"])";if(l)f="\\\\"+f;return b=b.replace(new RegExp(f,"g"),D)},D=function(b,f){return"~E"+f.charCodeAt(0)+"E"}};var Showdown=Attacklab.showdown;Attacklab.fileLoaded&&Attacklab.fileLoaded("showdown.js");window.PR_SHOULD_USE_CONTINUATION=true;
+window.PR_TAB_WIDTH=8;window.PR_normalizedHtml=window.PR=window.prettyPrintOne=window.prettyPrint=void 0;window._pr_isIE6=function(){var K=navigator&&navigator.userAgent&&navigator.userAgent.match(/\bMSIE ([678])\./);K=K?+K[1]:false;window._pr_isIE6=function(){return K};return K};
+(function(){function K(h){return h.replace(C,"&amp;").replace(p,"&lt;").replace(D,"&gt;").replace(b,"&quot;")}function I(h){return h.replace(C,"&amp;").replace(p,"&lt;").replace(D,"&gt;")}function g(h){var j=h.indexOf("&");if(j<0)return h;for(--j;(j=h.indexOf("&#",j+1))>=0;){var w=h.indexOf(";",j);if(w>=0){var u=h.substring(j+3,w),J=10;if(u&&u.charAt(0)==="x"){u=u.substring(1);J=16}u=parseInt(u,J);isNaN(u)||(h=h.substring(0,j)+String.fromCharCode(u)+h.substring(w+1))}}return h.replace(f,"<").replace(l,
+">").replace(q,"'").replace(B,'"').replace(ja," ").replace(ca,"&")}function m(h){return"XMP"===h.tagName}function T(h,j){if("PRE"===h.tagName)return true;if(!V.test(j))return true;j="";if(h.currentStyle)j=h.currentStyle.whiteSpace;else if(window.getComputedStyle)j=window.getComputedStyle(h,null).whiteSpace;return!j||j==="pre"}function aa(h,j){switch(h.nodeType){case 1:var w=h.tagName.toLowerCase();j.push("<",w);for(var u=0;u<h.attributes.length;++u){var J=h.attributes[u];if(J.specified){j.push(" ");
+aa(J,j)}}j.push(">");for(u=h.firstChild;u;u=u.nextSibling)aa(u,j);if(h.firstChild||!/^(?:br|link|img)$/.test(w))j.push("</",w,">");break;case 2:j.push(h.name.toLowerCase(),'="',K(h.value),'"');break;case 3:case 4:j.push(I(h.nodeValue));break}}function z(h){function j(y){if(y.charAt(0)!=="\\")return y.charCodeAt(0);switch(y.charAt(1)){case "b":return 8;case "t":return 9;case "n":return 10;case "v":return 11;case "f":return 12;case "r":return 13;case "u":case "x":return parseInt(y.substring(2),16)||
+y.charCodeAt(1);case "0":case "1":case "2":case "3":case "4":case "5":case "6":case "7":return parseInt(y.substring(1),8);default:return y.charCodeAt(1)}}function w(y){if(y<32)return(y<16?"\\x0":"\\x")+y.toString(16);y=String.fromCharCode(y);if(y==="\\"||y==="-"||y==="["||y==="]")y="\\"+y;return y}function u(y){var E=y.substring(1,y.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g"));y=[];for(var v=[],F=E[0]==="^",o=
+F?1:0,t=E.length;o<t;++o){var A=E[o];switch(A){case "\\B":case "\\b":case "\\D":case "\\d":case "\\S":case "\\s":case "\\W":case "\\w":y.push(A);continue}A=j(A);var X;if(o+2<t&&"-"===E[o+1]){X=j(E[o+2]);o+=2}else X=A;v.push([A,X]);if(!(X<65||A>122)){X<65||A>90||v.push([Math.max(65,A)|32,Math.min(X,90)|32]);X<97||A>122||v.push([Math.max(97,A)&-33,Math.min(X,122)&-33])}}v.sort(function(fa,la){return fa[0]-la[0]||la[1]-fa[1]});E=[];A=[NaN,NaN];for(o=0;o<v.length;++o){t=v[o];if(t[0]<=A[1]+1)A[1]=Math.max(A[1],
+t[1]);else E.push(A=t)}v=["["];F&&v.push("^");v.push.apply(v,y);for(o=0;o<E.length;++o){t=E[o];v.push(w(t[0]));if(t[1]>t[0]){t[1]+1>t[0]&&v.push("-");v.push(w(t[1]))}}v.push("]");return v.join("")}function J(y){for(var E=y.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),v=E.length,F=[],o=0,t=0;o<v;++o){var A=E[o];if(A==="(")++t;else if("\\"===A.charAt(0))if((A=
++A.substring(1))&&A<=t)F[A]=-1}for(o=1;o<F.length;++o)if(-1===F[o])F[o]=++N;for(t=o=0;o<v;++o){A=E[o];if(A==="("){++t;if(F[t]===undefined)E[o]="(?:"}else if("\\"===A.charAt(0))if((A=+A.substring(1))&&A<=t)E[o]="\\"+F[t]}for(t=o=0;o<v;++o)if("^"===E[o]&&"^"!==E[o+1])E[o]="";if(y.ignoreCase&&G)for(o=0;o<v;++o){A=E[o];y=A.charAt(0);if(A.length>=2&&y==="[")E[o]=u(A);else if(y!=="\\")E[o]=A.replace(/[a-zA-Z]/g,function(X){X=X.charCodeAt(0);return"["+String.fromCharCode(X&-33,X|32)+"]"})}return E.join("")}
+for(var N=0,G=false,O=false,P=0,S=h.length;P<S;++P){var Q=h[P];if(Q.ignoreCase)O=true;else if(/[a-z]/i.test(Q.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){G=true;O=false;break}}var Y=[];P=0;for(S=h.length;P<S;++P){Q=h[P];if(Q.global||Q.multiline)throw new Error(""+Q);Y.push("(?:"+J(Q)+")")}return new RegExp(Y.join("|"),O?"gi":"g")}function ba(h){if(null===ka){var j=document.createElement("PRE");j.appendChild(document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />'));ka=
+!/</.test(j.innerHTML)}if(ka){j=h.innerHTML;if(m(h))j=I(j);else T(h,j)||(j=j.replace(/(<br\s*\/?>)[\r\n]+/g,"$1").replace(/(?:[\r\n]+[ \t]*)+/g," "));return j}j=[];for(h=h.firstChild;h;h=h.nextSibling)aa(h,j);return j.join("")}function s(h){var j=0;return function(w){for(var u=null,J=0,N=0,G=w.length;N<G;++N)switch(w.charAt(N)){case "\t":u||(u=[]);u.push(w.substring(J,N));J=h-j%h;for(j+=J;J>=0;J-=16)u.push(" ".substring(0,J));J=N+1;break;case "\n":j=0;break;default:++j}if(!u)return w;
+u.push(w.substring(J));return u.join("")}}function U(h){h=h.match(na);var j=[],w=0,u=[];if(h)for(var J=0,N=h.length;J<N;++J){var G=h[J];if(G.length>1&&G.charAt(0)==="<"){if(!oa.test(G))if(pa.test(G)){j.push(G.substring(9,G.length-3));w+=G.length-12}else if(qa.test(G)){j.push("\n");++w}else if(G.indexOf(W)>=0&&ga(G)){var O=G.match(ma)[2],P=1,S;S=J+1;a:for(;S<N;++S){var Q=h[S].match(ma);if(Q&&Q[2]===O)if(Q[1]==="/"){if(--P===0)break a}else++P}if(S<N){u.push(w,h.slice(J,S+1).join(""));J=S}else u.push(w,
+G)}else u.push(w,G)}else{G=g(G);j.push(G);w+=G.length}}return{source:j.join(""),tags:u}}function ga(h){return!!h.replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g,' $1="$2$3$4"').match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/)}function ea(h,j,w,u){if(j){h={source:j,basePos:h};w(h);u.push.apply(u,h.decorations)}}function da(h,j){var w={},u;(function(){for(var G=h.concat(j),O=[],P={},S=0,Q=G.length;S<Q;++S){var Y=G[S],y=Y[3];if(y)for(var E=y.length;--E>=0;)w[y.charAt(E)]=Y;Y=Y[1];y=""+Y;if(!P.hasOwnProperty(y)){O.push(Y);
+P[y]=null}}O.push(/[\0-\uffff]/);u=z(O)})();var J=j.length,N=function(G){for(var O=G.basePos,P=[O,n],S=0,Q=G.source.match(u)||[],Y={},y=0,E=Q.length;y<E;++y){var v=Q[y],F=Y[v],o=void 0,t;if(typeof F==="string")t=false;else{var A=w[v.charAt(0)];if(A){o=v.match(A[1]);F=A[0]}else{for(t=0;t<J;++t){A=j[t];if(o=v.match(A[1])){F=A[0];break}}o||(F=n)}if((t=F.length>=5&&"lang-"===F.substring(0,5))&&!(o&&typeof o[1]==="string")){t=false;F=M}t||(Y[v]=F)}A=S;S+=v.length;if(t){t=o[1];var X=v.indexOf(t),fa=X+t.length;
+if(o[2]){fa=v.length-o[2].length;X=fa-t.length}F=F.substring(5);ea(O+A,v.substring(0,X),N,P);ea(O+A+X,t,c(F,t),P);ea(O+A+fa,v.substring(fa),N,P)}else P.push(O+A,F)}G.decorations=P};return N}function $(h){var j=[],w=[];if(h.tripleQuotedStrings)j.push([r,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]);else h.multiLineStrings?j.push([r,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,
+null,"'\"`"]):j.push([r,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]);h.verbatimStrings&&w.push([r,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);if(h.hashComments)if(h.cStyleComments){j.push([L,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]);w.push([r,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else j.push([L,/^#[^\r\n]*/,null,"#"]);if(h.cStyleComments){w.push([L,/^\/\/[^\r\n]*/,
+null]);w.push([L,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}h.regexLiterals&&w.push(["lang-regex",new RegExp("^"+Z+"(/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/)")]);h=h.keywords.replace(/^\s+|\s+$/g,"");h.length&&w.push([H,new RegExp("^(?:"+h.replace(/\s+/g,"|")+")\\b"),null]);j.push([n,/^\s+/,null," \r\n\t\u00a0"]);w.push([x,/^@[a-z_$][a-z_$@0-9]*/i,null],[R,/^@?[A-Z]+[a-z][A-Za-z_$@0-9]*/,null],[n,/^[a-z_$][a-z_$@0-9]*/i,null],[x,/^(?:0x[a-f0-9]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+\-]?\d+)?)[a-z]*/i,
+null,"0123456789"],[k,/^.[^\s\w\.$@\'\"\`\/\#]*/,null]);return da(j,w)}function ha(h){function j(t){if(t>G){if(O&&O!==P){N.push("</span>");O=null}if(!O&&P){O=P;N.push('<span class="',O,'">')}var A=I(Y(w.substring(G,t))).replace(o?E:y,"$1&nbsp;");o=F.test(A);var X=window._pr_isIE6()?"&nbsp;<br />":"<br />";N.push(A.replace(v,X));G=t}}for(var w=h.source,u=h.extractedTags,J=h.decorations,N=[],G=0,O=null,P=null,S=0,Q=0,Y=s(window.PR_TAB_WIDTH),y=/([\r\n ]) /g,E=/(^| ) /gm,v=/\r\n?|\n/g,F=/[ \r\n]$/,o=
+true;;)if(S<u.length?Q<J.length?u[S]<=J[Q]:true:false){j(u[S]);if(O){N.push("</span>");O=null}N.push(u[S+1]);S+=2}else if(Q<J.length){j(J[Q]);P=J[Q+1];Q+=2}else break;j(w.length);O&&N.push("</span>");h.prettyPrintedHtml=N.join("")}function a(h,j){for(var w=j.length;--w>=0;){var u=j[w];if(ia.hasOwnProperty(u))"console"in window&&console.warn("cannot override language handler %s",u);else ia[u]=h}}function c(h,j){h&&ia.hasOwnProperty(h)||(h=/^\s*</.test(j)?"default-markup":"default-code");return ia[h]}
+function e(h){var j=h.sourceCodeHtml,w=h.langExtension;h.prettyPrintedHtml=j;try{var u=U(j),J=u.source;h.source=J;h.basePos=0;h.extractedTags=u.tags;c(w,J)(h);ha(h)}catch(N){if("console"in window){console.log(N);console.trace()}}}function d(h,j){h={sourceCodeHtml:h,langExtension:j};e(h);return h.prettyPrintedHtml}function i(h){function j(){for(var E=window.PR_SHOULD_USE_CONTINUATION?Q.now()+250:Infinity;Y<G.length&&Q.now()<E;Y++){var v=G[Y];if(v.className&&v.className.indexOf("prettyprint")>=0){var F=
+v.className.match(/\blang-(\w+)\b/);if(F)F=F[1];for(var o=false,t=v.parentNode;t;t=t.parentNode)if((t.tagName==="pre"||t.tagName==="code"||t.tagName==="xmp")&&t.className&&t.className.indexOf("prettyprint")>=0){o=true;break}if(!o){o=ba(v);o=o.replace(/(?:\r\n?|\n)$/,"");y={sourceCodeHtml:o,langExtension:F,sourceNode:v};e(y);w()}}}if(Y<G.length)setTimeout(j,250);else h&&h()}function w(){var E=y.prettyPrintedHtml;if(E){var v=y.sourceNode;if(m(v)){for(var F=document.createElement("PRE"),o=0;o<v.attributes.length;++o){var t=
+v.attributes[o];if(t.specified)if(t.name.toLowerCase()==="class")F.className=t.value;else F.setAttribute(t.name,t.value)}F.innerHTML=E;v.parentNode.replaceChild(F,v);v=F}else v.innerHTML=E;if(u&&v.tagName==="PRE"){E=v.getElementsByTagName("br");for(v=E.length;--v>=0;){F=E[v];F.parentNode.replaceChild(document.createTextNode(J),F)}}}}for(var u=window._pr_isIE6(),J=u===6?"\r\n":"\r",N=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],G=
+[],O=0;O<N.length;++O)for(var P=0,S=N[O].length;P<S;++P)G.push(N[O][P]);N=null;var Q=Date;Q.now||(Q={now:function(){return(new Date).getTime()}});var Y=0,y;j()}var r="str",H="kwd",L="com",R="typ",x="lit",k="pun",n="pln",M="src",W="nocode",Z=function(){for(var h=["!","!=","!==","#","%","%=","&","&&","&&=","&=","(","*","*=","+=",",","-=","->","/","/=",":","::",";","<","<<","<<=","<=","=","==","===",">",">=",">>",">>=",">>>",">>>=","?","@","[","^","^=","^^","^^=","{","|","|=","||","||=","~","break",
+"case","continue","delete","do","else","finally","instanceof","return","throw","try","typeof"],j="(?:^^|[+-]",w=0;w<h.length;++w)j+="|"+h[w].replace(/([^=<>:&a-z])/g,"\\$1");j+=")\\s*";return j}(),C=/&/g,p=/</g,D=/>/g,b=/\"/g,f=/&lt;/g,l=/&gt;/g,q=/&apos;/g,B=/&quot;/g,ca=/&amp;/g,ja=/&nbsp;/g,V=/[\r\n]/g,ka=null,na=new RegExp("[^<]+|<!--[\\s\\S]*?--\>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>|</?[a-zA-Z](?:[^>\"']|'[^']*'|\"[^\"]*\")*>|<","g"),oa=/^<\!--/,pa=/^<!\[CDATA\[/,qa=/^<br\b/i,ma=/^<(\/?)([a-zA-Z][a-zA-Z0-9]*)/,
+ra=$({keywords:"break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename using virtual wchar_t where break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params partial readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof debugger eval export function get null set undefined var with Infinity NaN caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END break continue do else for if return while and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None break continue do else for if return while alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END break continue do else for if return while case done elif esac eval fi function in local set then until ",
+hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true}),ia={};a(ra,["default-code"]);a(da([],[[n,/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],[L,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[k,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup",
+"htm","html","mxml","xhtml","xml","xsl"]);a(da([[n,/^[\s]+/,null," \t\r\n"],["atv",/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[k,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],
+["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);a(da([],[["atv",/^[\s\S]+/]]),["uq.val"]);a($({keywords:"break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename using virtual wchar_t where ",
+hashComments:true,cStyleComments:true}),["c","cc","cpp","cxx","cyc","m"]);a($({keywords:"null true false"}),["json"]);a($({keywords:"break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params partial readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var ",
+hashComments:true,cStyleComments:true,verbatimStrings:true}),["cs"]);a($({keywords:"break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient ",
+cStyleComments:true}),["java"]);a($({keywords:"break continue do else for if return while case done elif esac eval fi function in local set then until ",hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);a($({keywords:"break continue do else for if return while and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None ",hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);
+a($({keywords:"caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END ",hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);a($({keywords:"break continue do else for if return while alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END ",hashComments:true,
+multiLineStrings:true,regexLiterals:true}),["rb"]);a($({keywords:"break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof debugger eval export function get null set undefined var with Infinity NaN ",cStyleComments:true,regexLiterals:true}),["js"]);a(da([],[[r,/^[\s\S]+/]]),
+["regex"]);window.PR_normalizedHtml=aa;window.prettyPrintOne=d;window.prettyPrint=i;window.PR={combinePrefixPatterns:z,createSimpleLexer:da,registerLangHandler:a,sourceDecorator:$,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:L,PR_DECLARATION:"dec",PR_KEYWORD:H,PR_LITERAL:x,PR_NOCODE:W,PR_PLAIN:n,PR_PUNCTUATION:k,PR_SOURCE:M,PR_STRING:r,PR_TAG:"tag",PR_TYPE:R}})();
View
6 rakefile.rb
@@ -1,5 +1,5 @@
-task :default => [:concat]
+task :default => [:minify]
task :concat do
f = File.new('jquery.wmd.js','w')
@@ -8,3 +8,7 @@
end
f.close
end
+
+task :minify => [:concat] do
+ system("java -jar build/compiler.jar --js jquery.wmd.js --js_output_file jquery.wmd.min.js")
+end
View
2  showdown.js
@@ -959,7 +959,7 @@ var _DoCodeSpans = function(text) {
c = c.replace(/^([ \t]*)/g,""); // leading whitespace
c = c.replace(/[ \t]*$/g,""); // trailing whitespace
c = _EncodeCode(c);
- return m1+"<code>"+c+"</code>";
+ return m1+"<code class='prettyprint'>"+c+"</code>";
});
return text;
View
2  wmd-test.html
@@ -7,7 +7,7 @@
<link rel="stylesheet" type="text/css" href="wmd.css" />
<script type="text/javascript" src="jquery.js"></script>
- <script type="text/javascript" src="jquery.wmd.js"></script>
+ <script type="text/javascript" src="jquery.wmd.min.js"></script>
</head>
<body>
Please sign in to comment.
Something went wrong with that request. Please try again.