12 |
- // Licensed under the MIT license.
- !function(){var t={version:"0.1.2"};"undefined"!=typeof module&&module.exports?module.exports=t:this.doU=t,t.templateSettings={begin:"{{",end:"}}",varname:"it"},t.template=function(e,o){o=o||t.templateSettings;var n,i,r="",s=o.begin,l=o.end,u=e.replace(/\s*<!\[CDATA\[\s*|\s*\]\]>\s*|[\r\n\t]|(\/\*[\s\S]*?\*\/)/g,"").split(s).join(l+"").split(l);for(n=0,i=u.length;i>n;n++)r+=""!==u[n].charAt(0)?"out+='"+u[n].replace(/(\\|["'])/g,"\\$1")+"'":"="===u[n].charAt(1)?";out+=("+u[n].substr(2)+");":"!"===u[n].charAt(1)?";out+=("+u[n].substr(2)+").toString().replace(/&(?!\\w+;)/g, '&').split('<').join('<').split('>').join('>').split('\"').join('"').split(\"'\").join(''').split('/').join('/');":";"+u[n].substr(1);r=('var out="";'+r+";return out;").split("out+='';").join("").split('var out="";out+=').join("var out=");try{return new Function(o.varname,r)}catch(a){throw"undefined"!=typeof console&&console.log("Could not create a template function: "+r),a}}}();
|