diff -r a4642baaf829 -r 4d4862461b8d web/wp-includes/js/codepress/languages/ruby.js --- a/web/wp-includes/js/codepress/languages/ruby.js Tue Feb 02 14:45:47 2010 +0000 +++ b/web/wp-includes/js/codepress/languages/ruby.js Tue Feb 02 15:44:16 2010 +0000 @@ -1,26 +1,26 @@ -/* - * CodePress regular expressions for Perl syntax highlighting - */ - -// Ruby -Language.syntax = [ - { input : /\"(.*?)(\"|
|<\/P>)/g, output : '"$1$2' }, // strings double quote - { input : /\'(.*?)(\'|
|<\/P>)/g, output : '\'$1$2' }, // strings single quote - { input : /([\$\@\%]+)([\w\.]*)/g, output : '$1$2' }, // vars - { input : /(def\s+)([\w\.]*)/g, output : '$1$2' }, // functions - { 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 : '$1' }, // reserved words - { input : /([\(\){}])/g, output : '$1' }, // special chars - { input : /#(.*?)(
|<\/P>)/g, output : '#$1$2' } // comments -]; - -Language.snippets = [] - -Language.complete = [ - { input : '\'',output : '\'$0\'' }, - { input : '"', output : '"$0"' }, - { input : '(', output : '\($0\)' }, - { input : '[', output : '\[$0\]' }, - { input : '{', output : '{\n\t$0\n}' } -] - -Language.shortcuts = [] +/* + * CodePress regular expressions for Perl syntax highlighting + */ + +// Ruby +Language.syntax = [ + { input : /\"(.*?)(\"|
|<\/P>)/g, output : '"$1$2' }, // strings double quote + { input : /\'(.*?)(\'|
|<\/P>)/g, output : '\'$1$2' }, // strings single quote + { input : /([\$\@\%]+)([\w\.]*)/g, output : '$1$2' }, // vars + { input : /(def\s+)([\w\.]*)/g, output : '$1$2' }, // functions + { 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 : '$1' }, // reserved words + { input : /([\(\){}])/g, output : '$1' }, // special chars + { input : /#(.*?)(
|<\/P>)/g, output : '#$1$2' } // comments +]; + +Language.snippets = [] + +Language.complete = [ + { input : '\'',output : '\'$0\'' }, + { input : '"', output : '"$0"' }, + { input : '(', output : '\($0\)' }, + { input : '[', output : '\[$0\]' }, + { input : '{', output : '{\n\t$0\n}' } +] + +Language.shortcuts = []