PluginProbe
Wp-Insert / 1.5.1
Wp-Insert v1.5.1
trunk 1.0 1.1 1.2 1.2.1 1.2.2 1.3.0 1.3.1 1.3.3 1.4 1.5.0 1.5.1 1.5.2 1.5.3 1.6.0 1.6.1 1.6.2 1.7 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 2.0 All 63 releases
wp-insert / codepress / languages / csharp.js

csharp.js in Wp-Insert 1.5.1, at codepress/languages/csharp.js

25 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*
2 * CodePress regular expressions for C# syntax highlighting
3 * By Edwin de Jonge
4 */
5
6 Language.syntax = [ // C#
7 { input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote
8 { input : /\'(.?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single quote
9 { input : /\b(abstract|as|base|break|case|catch|checked|continue|default|delegate|do|else|event|explicit|extern|false|finally|fixed|for|foreach|get|goto|if|implicit|in|interface|internal|is|lock|namespace|new|null|object|operator|out|override|params|partial|private|protected|public|readonly|ref|return|set|sealed|sizeof|static|stackalloc|switch|this|throw|true|try|typeof|unchecked|unsafe|using|value|virtual|while)\b/g, output : '<b>$1</b>' }, // reserved words
10 { input : /\b(bool|byte|char|class|double|float|int|interface|long|string|struct|void)\b/g, output : '<a>$1</a>' }, // types
11 { input : /([^:]|^)\/\/(.*?)(<br|<\/P)/g, output : '$1<i>//$2</i>$3' }, // comments //
12 { input : /\/\*(.*?)\*\//g, output : '<i>/*$1*/</i>' } // comments /* */
13 ];
14
15 Language.snippets = [];
16
17 Language.complete = [ // Auto complete only for 1 character
18 {input : '\'',output : '\'$0\'' },
19 {input : '"', output : '"$0"' },
20 {input : '(', output : '\($0\)' },
21 {input : '[', output : '\[$0\]' },
22 {input : '{', output : '{\n\t$0\n}' }
23 ];
24
25 Language.shortcuts = [];