Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/static/code_highlighter_ruby.js
blob: e60311867cb9c58adaac45e2cc4ba9bcc3ed72cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
CodeHighlighter.addStyle("rb",{
	comment : {
		exp  : /#[^\n]+/
	},
	brackets : {
		exp  : /\(|\)|\{|\}/
	},
	string : {
		exp  : /'[^']*'|"[^"]*"/
	},
	keywords : {
		exp  : /\b(do|end|self|class|def|if|module|yield|then|else|for|until|unless|while|elsif|case|when|break|retry|redo|rescue|raise)\b/
	},
  constant : {
    exp  : /\b([A-Z]\w+)\b/
  },
  ivar : {
    exp  : /([^@])(@{1,2}\w+)\b/
  },
  ns   : {
    exp  : /(:{2,})/
  },
	symbol : {
	  exp : /(:[A-Za-z0-9_!?]+)/
	}
});