From: Alan Knowles Date: Fri, 9 Sep 2016 06:46:24 +0000 (+0800) Subject: roojs-doc.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=22392ef77feacc21b945aa3c42a2824c8cf5c202 roojs-doc.js roojs-doc-debug.js --- diff --git a/roojs-doc-debug.js b/roojs-doc-debug.js index 684e519471..3fa0145fda 100644 --- a/roojs-doc-debug.js +++ b/roojs-doc-debug.js @@ -127,7 +127,7 @@ Roo.extend(Roo.doc.Example, Roo.bootstrap.Component, { // no colour highlighting in here.... - var code = hljs ? hljs.highlight(this.code, this.lang) : String.format('{0}',this.code).replace(/\n/g, '
'); + var code = hljs ? hljs.highlight(this.code, this.lang.toUpperCase()) : String.format('{0}',this.code).replace(/\n/g, '
'); var cfg ={ diff --git a/roojs-doc.js b/roojs-doc.js index 05e4ddf528..c9bc86fa12 100644 --- a/roojs-doc.js +++ b/roojs-doc.js @@ -3,7 +3,7 @@ Roo.doc=Roo.doc||{};Roo.doc.Entry=function(A){Roo.doc.Entry.superclass.construct ,{cls:'refnamediv',html:this.purpose}]};return A;},addxtype:function(A,B){return this.addxtypeChild(A,B);},onRender:function(ct,A){Roo.doc.Entry._calls++;if(Roo.doc.Entry._calls>1||!ct){return;}Roo.bootstrap.Component.prototype.onRender.call(this,ct,A);}} ); // Roo/doc/Example.js -Roo.doc.Example=function(A){Roo.doc.Example.superclass.constructor.call(this,A);};Roo.extend(Roo.doc.Example,Roo.bootstrap.Component,{title:'',lang:'php',code:'',output:'',getAutoCreate:function(){var A=hljs?hljs.highlight(this.code,this.lang):String.format('{0}',this.code).replace(/\n/g,'
'); +Roo.doc.Example=function(A){Roo.doc.Example.superclass.constructor.call(this,A);};Roo.extend(Roo.doc.Example,Roo.bootstrap.Component,{title:'',lang:'php',code:'',output:'',getAutoCreate:function(){var A=hljs?hljs.highlight(this.code,this.lang.toUpperCase()):String.format('{0}',this.code).replace(/\n/g,'
'); var B={cls:'panel panel-info',cn:[{cls:'panel-heading',html:this.title},{cls:'panel-body',cn:[{tag:'pre',cls:'lang-'+this.lang,html:A}]}]};if(this.output){B.cn.push({cls:'panel-footer',cn:{tag:'code',html:String.format('{0}',this.output).replace(/\n/g,'
')} });}return B;}}); // Roo/doc/Para.js