PluginProbe
Wp-Insert / 1.3.0
Wp-Insert v1.3.0
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 / ruby.js

ruby.js in Wp-Insert 1.3.0, at codepress/languages/ruby.js

27 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*
2 * CodePress regular expressions for Perl syntax highlighting
3 */
4
5 // Ruby
6 Language.syntax = [
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 : /([\$\@\%]+)([\w\.]*)/g, output : '<a>$1$2</a>' }, // vars
10 { input : /(def\s+)([\w\.]*)/g, output : '$1<em>$2</em>' }, // functions
11 { input : /\b(alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|false|for|if|in|module|next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\b/g, output : '<b>$1</b>' }, // reserved words
12 { input : /([\(\){}])/g, output : '<u>$1</u>' }, // special chars
13 { input : /#(.*?)(<br>|<\/P>)/g, output : '<i>#$1</i>$2' } // comments
14 ];
15
16 Language.snippets = []
17
18 Language.complete = [
19 { input : '\'',output : '\'$0\'' },
20 { input : '"', output : '"$0"' },
21 { input : '(', output : '\($0\)' },
22 { input : '[', output : '\[$0\]' },
23 { input : '{', output : '{\n\t$0\n}' }
24 ]
25
26 Language.shortcuts = []
27