/* * 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 = []