From 8ceee5fcd2ea7397eca046977ec4a7927f8b59b6 Mon Sep 17 00:00:00 2001
From: Alan Knowles '+F+'
';}return ''+(H?F:escape(F,true))+'\n
\n';};E.prototype.blockquote=function(F){return ''+(H?F:escape(F,true))+'\n
\n'+F+'
\n';
-};E.prototype.html=function(F){return F;};E.prototype.heading=function(F,G,H){return '
\n':'
\n';
-};E.prototype.list=function(F,G){var H=G?'ol':'ul';return '<'+H+'>\n'+F+''+H+'>\n';};E.prototype.listitem=function(F){return '\n'+'\n'+F+'\n'+'\n'+G+'\n'+'
\n';
-};E.prototype.tablerow=function(F){return '\n'+F+' \n';};E.prototype.tablecell=function(F,G){var H=G.header?'th':'td';var I=G.align?'<'+H+' style="text-align:'+G.align+'">':'<'+H+'>';return I+F+''+H+'>\n';};E.prototype.strong=function(F){return ''+F+'';
-};E.prototype.em=function(F){return ''+F+'';};E.prototype.codespan=function(F){return ''+F+'
';};E.prototype.br=function(){return this.options.xhtml?'
':'
';};E.prototype.del=function(F){return ''+F+'';};E.prototype.link=function(F,G,H){if(this.options.sanitize){try{var I=decodeURIComponent(unescape(F)).replace(/[^\w:]/g,'').toLowerCase();
-}catch(e){return '';}if(I.indexOf('javascript:')===0||I.indexOf('vbscript:')===0){return '';}}var J=''+H+'';return J;};E.prototype.image=function(F,G,H){var I='':'>';return I;};E.prototype.text=function(F){return F;};function Parser(F){this.tokens=[];this.token=null;this.options=F||marked.defaults;this.options.renderer=this.options.renderer||new E;this.renderer=this.options.renderer;this.renderer.options=this.options;
-}Parser.parse=function(F,G,H){var I=new Parser(G,H);return I.parse(F);};Parser.prototype.parse=function(F){this.inline=new D(F.links,this.options,this.renderer);this.tokens=F.reverse();var G='';while(this.next()){G+=this.tok();}return G;};Parser.prototype.next=function(){return this.token=this.tokens.pop();
-};Parser.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0;};Parser.prototype.parseText=function(){var F=this.token.text;while(this.peek().type==='text'){F+='\n'+this.next().text;}return this.inline.output(F);};Parser.prototype.tok=function(){switch(this.token.type){case 'space':{return '';
-}case 'hr':{return this.renderer.hr();}case 'heading':{return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);}case 'code':{return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);}case 'table':{var F='',G='',i,H,I,J,j;
-I='';for(i=0;i
'+escape(e.message+'',true)+'';}throw e;}}marked.options=marked.setOptions=function(F){merge(marked.defaults,F);return marked;};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,sanitizer:null,mangle:true,smartLists:false,silent:false,highlight:null,langPrefix:'lang-',smartypants:false,headerPrefix:'',renderer:new E,xhtml:false} -;marked.Parser=Parser;marked.parser=Parser.parse;marked.Renderer=E;marked.Lexer=B;marked.lexer=B.lex;marked.InlineLexer=D;marked.inlineLexer=D.output;marked.parse=marked;Roo.Markdown.marked=marked;})(); +);C.breaks=merge({},C.gfm,{br:replace(C.br)('{2,}','*')(),text:replace(C.gfm.text)('{2,}','*')()});var D=function(G,H){this.options=H||marked.defaults;this.links=G;this.rules=C.normal;this.renderer=this.options.renderer||new E;this.renderer.options=this.options; +if(!this.links){throw new Error('Tokens array requires a `links` property.');}if(this.options.gfm){if(this.options.breaks){this.rules=C.breaks;}else{this.rules=C.gfm;}}else if(this.options.pedantic){this.rules=C.pedantic;}};D.rules=C;D.output=function(G,H,I){var J=new D(H,I); +return J.output(G);};D.prototype.output=function(G){var H='',I,J,K,L;while(G){if(L=this.rules.escape.exec(G)){G=G.substring(L[0].length);H+=L[1];continue;}if(L=this.rules.autolink.exec(G)){G=G.substring(L[0].length);if(L[2]==='@'){J=L[1].charAt(6)===':'?this.mangle(L[1].substring(7)):this.mangle(L[1]); +K=this.mangle('mailto:')+J;}else{J=escape(L[1]);K=J;}H+=this.renderer.link(K,null,J);continue;}if(!this.inLink&&(L=this.rules.url.exec(G))){G=G.substring(L[0].length);J=escape(L[1]);K=J;H+=this.renderer.link(K,null,J);continue;}if(L=this.rules.tag.exec(G)){if(!this.inLink&&/^/i.test(L[0])){this.inLink=false;}G=G.substring(L[0].length);H+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(L[0]):escape(L[0]):L[0];continue;}if(L=this.rules.link.exec(G)){G=G.substring(L[0].length);this.inLink=true; +H+=this.outputLink(L,{href:L[2],title:L[3]});this.inLink=false;continue;}if((L=this.rules.reflink.exec(G))||(L=this.rules.nolink.exec(G))){G=G.substring(L[0].length);I=(L[2]||L[1]).replace(/\s+/g,' ');I=this.links[I.toLowerCase()];if(!I||!I.href){H+=L[0].charAt(0); +G=L[0].substring(1)+G;continue;}this.inLink=true;H+=this.outputLink(L,I);this.inLink=false;continue;}if(L=this.rules.strong.exec(G)){G=G.substring(L[0].length);H+=this.renderer.strong(this.output(L[2]||L[1]));continue;}if(L=this.rules.em.exec(G)){G=G.substring(L[0].length); +H+=this.renderer.em(this.output(L[2]||L[1]));continue;}if(L=this.rules.code.exec(G)){G=G.substring(L[0].length);H+=this.renderer.codespan(escape(L[2],true));continue;}if(L=this.rules.br.exec(G)){G=G.substring(L[0].length);H+=this.renderer.br();continue;}if(L=this.rules.del.exec(G)){G=G.substring(L[0].length); +H+=this.renderer.del(this.output(L[1]));continue;}if(L=this.rules.text.exec(G)){G=G.substring(L[0].length);H+=this.renderer.text(escape(this.smartypants(L[0])));continue;}if(G){throw new Error('Infinite loop on byte: '+G.charCodeAt(0));}}return H;};D.prototype.outputLink=function(G,H){var I=escape(H.href),J=H.title?escape(H.title):null; +return G[0].charAt(0)!=='!'?this.renderer.link(I,J,this.output(G[1])):this.renderer.image(I,J,escape(G[1]));};D.prototype.smartypants=function(G){if(!this.options.smartypants){return G;}return G.replace(/---/g,'\u2014').replace(/--/g,'\u2013').replace(/(^|[-\u2014/(\[{"\s])'/g,'$1\u2018').replace(/'/g,'\u2019').replace(/(^|[-\u2014/(\[{\u2018\s])"/g,'$1\u201c').replace(/"/g,'\u201d').replace(/\.{3}/g,'\u2026'); +};D.prototype.mangle=function(G){if(!this.options.mangle){return G;}var H='',l=G.length,i=0,ch;for(;i
'+(I?G:escape(G,true))+'\n
';}return ''+(I?G:escape(G,true))+'\n
\n';};E.prototype.blockquote=function(G){return '\n'+G+'\n'; +};E.prototype.html=function(G){return G;};E.prototype.heading=function(G,H,I){return '
'+G+'
\n';};E.prototype.table=function(G,H){return ''+G+'
';};E.prototype.br=function(){return this.options.xhtml?''+escape(e.message+'',true)+'';}throw e;}}marked.options=marked.setOptions=function(G){merge(marked.defaults,G);return marked;};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,sanitizer:null,mangle:true,smartLists:false,silent:false,highlight:null,langPrefix:'lang-',smartypants:false,headerPrefix:'',renderer:new E,xhtml:false} +;marked.Parser=F;marked.parser=F.parse;marked.Renderer=E;marked.Lexer=B;marked.lexer=B.lex;marked.InlineLexer=D;marked.inlineLexer=D.output;marked.parse=marked;Roo.Markdown.marked=marked;})(); // Roo/dd/DragDrop.js (function(){var A=Roo.EventManager;var B=Roo.lib.Dom;Roo.dd.DragDrop=function(id,C,D){if(id){this.init(id,C,D);}};Roo.extend(Roo.dd.DragDrop,Roo.util.Observable,{id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true; },unlock:function(){this.locked=false;},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(x,y){} diff --git a/roojs-core-debug.js b/roojs-core-debug.js index 30edece245..5fe012b525 100644 --- a/roojs-core-debug.js +++ b/roojs-core-debug.js @@ -17706,7 +17706,7 @@ Roo.Markdown.toHtml = function(text) { * Parsing & Compiling */ - function Parser(options) { + var Parser= function (options) { this.tokens = []; this.token = null; this.options = options || marked.defaults; diff --git a/roojs-core.js b/roojs-core.js index a71159b302..5ccb0cb563 100644 --- a/roojs-core.js +++ b/roojs-core.js @@ -688,56 +688,56 @@ return Roo.Markdown.marked(A);};(function(){var A={newline:/^\n+/,code:/^( {4}[^ A._tag='(?!(?:'+'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code'+'|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo'+'|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b';A.html=replace(A.html)('comment',//)('closed',/<(tag)[\s\S]+?<\/\1>/)('closing',/
'+(H?F:escape(F,true))+'\n
';}return ''+(H?F:escape(F,true))+'\n
\n';};E.prototype.blockquote=function(F){return '\n'+F+'\n'; -};E.prototype.html=function(F){return F;};E.prototype.heading=function(F,G,H){return '
'+F+'
\n';};E.prototype.table=function(F,G){return ''+F+'
';};E.prototype.br=function(){return this.options.xhtml?''+escape(e.message+'',true)+'';}throw e;}}marked.options=marked.setOptions=function(F){merge(marked.defaults,F);return marked;};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,sanitizer:null,mangle:true,smartLists:false,silent:false,highlight:null,langPrefix:'lang-',smartypants:false,headerPrefix:'',renderer:new E,xhtml:false} -;marked.Parser=Parser;marked.parser=Parser.parse;marked.Renderer=E;marked.Lexer=B;marked.lexer=B.lex;marked.InlineLexer=D;marked.inlineLexer=D.output;marked.parse=marked;Roo.Markdown.marked=marked;})(); +);C.breaks=merge({},C.gfm,{br:replace(C.br)('{2,}','*')(),text:replace(C.gfm.text)('{2,}','*')()});var D=function(G,H){this.options=H||marked.defaults;this.links=G;this.rules=C.normal;this.renderer=this.options.renderer||new E;this.renderer.options=this.options; +if(!this.links){throw new Error('Tokens array requires a `links` property.');}if(this.options.gfm){if(this.options.breaks){this.rules=C.breaks;}else{this.rules=C.gfm;}}else if(this.options.pedantic){this.rules=C.pedantic;}};D.rules=C;D.output=function(G,H,I){var J=new D(H,I); +return J.output(G);};D.prototype.output=function(G){var H='',I,J,K,L;while(G){if(L=this.rules.escape.exec(G)){G=G.substring(L[0].length);H+=L[1];continue;}if(L=this.rules.autolink.exec(G)){G=G.substring(L[0].length);if(L[2]==='@'){J=L[1].charAt(6)===':'?this.mangle(L[1].substring(7)):this.mangle(L[1]); +K=this.mangle('mailto:')+J;}else{J=escape(L[1]);K=J;}H+=this.renderer.link(K,null,J);continue;}if(!this.inLink&&(L=this.rules.url.exec(G))){G=G.substring(L[0].length);J=escape(L[1]);K=J;H+=this.renderer.link(K,null,J);continue;}if(L=this.rules.tag.exec(G)){if(!this.inLink&&/^/i.test(L[0])){this.inLink=false;}G=G.substring(L[0].length);H+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(L[0]):escape(L[0]):L[0];continue;}if(L=this.rules.link.exec(G)){G=G.substring(L[0].length);this.inLink=true; +H+=this.outputLink(L,{href:L[2],title:L[3]});this.inLink=false;continue;}if((L=this.rules.reflink.exec(G))||(L=this.rules.nolink.exec(G))){G=G.substring(L[0].length);I=(L[2]||L[1]).replace(/\s+/g,' ');I=this.links[I.toLowerCase()];if(!I||!I.href){H+=L[0].charAt(0); +G=L[0].substring(1)+G;continue;}this.inLink=true;H+=this.outputLink(L,I);this.inLink=false;continue;}if(L=this.rules.strong.exec(G)){G=G.substring(L[0].length);H+=this.renderer.strong(this.output(L[2]||L[1]));continue;}if(L=this.rules.em.exec(G)){G=G.substring(L[0].length); +H+=this.renderer.em(this.output(L[2]||L[1]));continue;}if(L=this.rules.code.exec(G)){G=G.substring(L[0].length);H+=this.renderer.codespan(escape(L[2],true));continue;}if(L=this.rules.br.exec(G)){G=G.substring(L[0].length);H+=this.renderer.br();continue;}if(L=this.rules.del.exec(G)){G=G.substring(L[0].length); +H+=this.renderer.del(this.output(L[1]));continue;}if(L=this.rules.text.exec(G)){G=G.substring(L[0].length);H+=this.renderer.text(escape(this.smartypants(L[0])));continue;}if(G){throw new Error('Infinite loop on byte: '+G.charCodeAt(0));}}return H;};D.prototype.outputLink=function(G,H){var I=escape(H.href),J=H.title?escape(H.title):null; +return G[0].charAt(0)!=='!'?this.renderer.link(I,J,this.output(G[1])):this.renderer.image(I,J,escape(G[1]));};D.prototype.smartypants=function(G){if(!this.options.smartypants){return G;}return G.replace(/---/g,'\u2014').replace(/--/g,'\u2013').replace(/(^|[-\u2014/(\[{"\s])'/g,'$1\u2018').replace(/'/g,'\u2019').replace(/(^|[-\u2014/(\[{\u2018\s])"/g,'$1\u201c').replace(/"/g,'\u201d').replace(/\.{3}/g,'\u2026'); +};D.prototype.mangle=function(G){if(!this.options.mangle){return G;}var H='',l=G.length,i=0,ch;for(;i
'+(I?G:escape(G,true))+'\n
';}return ''+(I?G:escape(G,true))+'\n
\n';};E.prototype.blockquote=function(G){return '\n'+G+'\n'; +};E.prototype.html=function(G){return G;};E.prototype.heading=function(G,H,I){return '
'+G+'
\n';};E.prototype.table=function(G,H){return ''+G+'
';};E.prototype.br=function(){return this.options.xhtml?''+escape(e.message+'',true)+'';}throw e;}}marked.options=marked.setOptions=function(G){merge(marked.defaults,G);return marked;};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,sanitizer:null,mangle:true,smartLists:false,silent:false,highlight:null,langPrefix:'lang-',smartypants:false,headerPrefix:'',renderer:new E,xhtml:false} +;marked.Parser=F;marked.parser=F.parse;marked.Renderer=E;marked.Lexer=B;marked.lexer=B.lex;marked.InlineLexer=D;marked.inlineLexer=D.output;marked.parse=marked;Roo.Markdown.marked=marked;})(); // Roo/dd/DragDrop.js (function(){var A=Roo.EventManager;var B=Roo.lib.Dom;Roo.dd.DragDrop=function(id,C,D){if(id){this.init(id,C,D);}};Roo.extend(Roo.dd.DragDrop,Roo.util.Observable,{id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true; },unlock:function(){this.locked=false;},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(x,y){} diff --git a/roojs-debug.js b/roojs-debug.js index c686fb71ed..4bd6823ab6 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -17706,7 +17706,7 @@ Roo.Markdown.toHtml = function(text) { * Parsing & Compiling */ - function Parser(options) { + var Parser= function (options) { this.tokens = []; this.token = null; this.options = options || marked.defaults; -- 2.39.2