do not show error message for syntax highliting on txt and cs files, see issue #731

This commit is contained in:
Sebastian Sdorra
2015-06-13 18:11:22 +02:00
parent d0032b09d8
commit ee0278b893

View File

@@ -49,6 +49,7 @@ Sonia.panel.SyntaxHighlighterPanel = Ext.extend(Ext.Panel, {
fileName: 'shBrushColdFusion.js'
},{
name: 'C#',
brush: 'csharp',
aliases: ['cs', 'c-sharp', 'csharp'],
fileName: 'shBrushCSharp.js'
},{
@@ -97,6 +98,7 @@ Sonia.panel.SyntaxHighlighterPanel = Ext.extend(Ext.Panel, {
fileName: 'shBrushPhp.js'
},{
name: 'Plain Text',
brush: 'plain',
aliases: ['plain', 'text', 'txt', 'log'],
fileName: 'shBrushPlain.js'
},{
@@ -160,6 +162,9 @@ Sonia.panel.SyntaxHighlighterPanel = Ext.extend(Ext.Panel, {
for ( var j=0;j<s.aliases.length; j++ ){
if ( this.syntax === s.aliases[j] ){
found = true;
if (s.brush){
this.syntax = s.brush;
}
this.brushUrl = s.fileName;
if (debug){
console.debug( "found brush " + this.syntax + " at " + this.brushUrl );