CoreFiles by mySites.guru
ruby.js26 lines, 1,092 bytes, from wordpress-2.8-beta1.zip
Raw History Compare with 2.7.1-beta1
md5
91e8cd2f56bca1c8f494b3be0625a0d6
sha1
53f6aea84f0c94598fd4b8c674b65ce8288f4ade
sha256
73d7d24756f06a9183c326e458d2999f6a77c1938cb7c9e214015c8d739f7b29
/*
 * CodePress regular expressions for Perl syntax highlighting
 */

// Ruby
Language.syntax = [
	{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote 
	{ input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single quote
	{ input : /([\$\@\%]+)([\w\.]*)/g, output : '<a>$1$2</a>' }, // vars
	{ input : /(def\s+)([\w\.]*)/g, output : '$1<em>$2</em>' }, // 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 : '<b>$1</b>' }, // reserved words
	{ input  : /([\(\){}])/g, output : '<u>$1</u>' }, // special chars
	{ input  : /#(.*?)(<br>|<\/P>)/g, output : '<i>#$1</i>$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 = []

The same content is in 25 releases, WordPress 2.8-beta1 to 3.0-beta2. See them all, or every version of this file.