(function(){Alfresco.WikiParser=function(){return this};Alfresco.WikiParser.prototype={URL:null,parse:function(b,a){a=a==null?[]:a;b=this._renderLinks(b,a);return b},_renderLinks:function(l,b){if(typeof l=="string"){var m=l.split("[["),h=l;if(m.length>1){var k=/^([^\|\]]+)(?:\|([^\]]+))?\]\]/;var a,c,j,f,d,e,g;h=m[0];for(c=1,j=m.length;c<j;c++){f=m[c];if(k.test(f)){d=k.exec(f);e=d[1].replace(/\s+/g,"_");g=Alfresco.util.arrayContains(b,e);a='<a href="'+this.URL+e+'" class="'+(g?"theme-color-1":"wiki-missing-page")+'">';a+=(d[2]?d[2]:d[1]);a+="</a>";h+=a;h+=f.substring(d[0].length)}}}return h}return l}}})();
