Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added Python and AppleScript, updated Tuby and JavaScript (Travis Cri…

…pps)
  • Loading branch information...
commit 547d56ec86486e6f0c2773ac533be84e3356718a 1 parent dfce333
@danwrong authored
Showing with 33 additions and 2 deletions.
  1. +17 −0 applescript.js
  2. +1 −1  javascript.js
  3. +14 −0 python.js
  4. +1 −1  ruby.js
View
17 applescript.js
@@ -0,0 +1,17 @@
+CodeHighlighter.addStyle("applescript",{
+ comment : {
+ exp : /--[^\n]+|#![^\n]+/
+ },
+ brackets : {
+ exp : /\(|\)/
+ },
+ string : {
+ exp : /"[^"\\]*(\\.[^"\\]*)*"/
+ },
+ keywords : {
+ exp : /\b(about|above|after|against|and|apart[\s]+from|around|as|aside[\s]+from|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|contain|contains|contains|continue|copy|div|does|eighth|else|end|equal|equals|error|every|exit|false|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|instead[\s]+of|into|is|it|its|last|local|me|middle|mod|my|ninth|not|of|on|onto|or|out[\s]+of|over|prop|property|put|ref|reference|repeat|return|returning|script|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|true|try|until|where|while|whose|with|without)\b/
+ },
+ global : {
+ exp : /\b(AppleScript('s)?|current[\s]+application|missing[\s]+value|false|pi|true|version)\b/
+ }
+});
View
2  javascript.js
@@ -6,7 +6,7 @@ CodeHighlighter.addStyle("javascript",{
exp : /\(|\)/
},
string : {
- exp : /'[^']*'|"[^"]*"/
+ exp : /'[^'\\]*(\\.[^'\\]*)*'|"[^"\\]*(\\.[^"\\]*)*"/
},
keywords : {
exp : /\b(arguments|break|case|continue|default|delete|do|else|false|for|function|if|in|instanceof|new|null|return|switch|this|true|typeof|var|void|while|with)\b/
View
14 python.js
@@ -0,0 +1,14 @@
+CodeHighlighter.addStyle("python",{
+ comment : {
+ exp : /#[^\n]+/
+ },
+ brackets : {
+ exp : /\(|\)/
+ },
+ string : {
+ exp : /'[^'\\]*(\\.[^'\\]*)*'|"[^"\\]*(\\.[^"\\]*)*"|""".*"""/
+ },
+ keywords : {
+ exp : /\b(and|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|yield|as|None)\b/
+ }
+});
View
2  ruby.js
@@ -6,7 +6,7 @@ CodeHighlighter.addStyle("ruby",{
exp : /\(|\)/
},
string : {
- exp : /'[^']*'|"[^"]*"/
+ 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|require|raise)\b/
Please sign in to comment.
Something went wrong with that request. Please try again.