Skip to content

Instantly share code, notes, and snippets.

@jashkenas
Created April 3, 2010 23:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jashkenas/354926 to your computer and use it in GitHub Desktop.
Save jashkenas/354926 to your computer and use it in GitHub Desktop.
diff -r 461a6fc5b50b pygments/lexers/web.py
--- a/pygments/lexers/web.py Fri Mar 12 20:05:12 2010 +0100
+++ b/pygments/lexers/web.py Sat Apr 03 19:11:03 2010 -0400
@@ -1563,7 +1563,7 @@
"""
For `CoffeeScript`_ source code.
- .. _CoffeeScript: http://jashkenas.github.com/coffee-script/
+ .. _CoffeeScript: http://coffeescript.org
*New in Pygments 1.3.*
"""
@@ -1607,9 +1607,11 @@
r'decodeURIComponent|encodeURI|encodeURIComponent|'
r'Error|eval|isFinite|isNaN|parseFloat|parseInt|document|this|'
r'window)\b', Name.Builtin),
- (r'[$a-zA-Z_][a-zA-Z0-9_\.:]*:\s', Name.Variable,
- 'slashstartsregex'),
- (r'[$a-zA-Z_][a-zA-Z0-9_]*', Name.Other),
+ (r'[$a-zA-Z_][a-zA-Z0-9_\.:]*\s*:\s', Name.Variable,
+ 'slashstartsregex'),
+ (r'@[$a-zA-Z_][a-zA-Z0-9_\.:]*\s*:\s', Name.Variable.Instance,
+ 'slashstartsregex'),
+ (r'@?[$a-zA-Z_][a-zA-Z0-9_]*', Name.Other, 'slashstartsregex'),
(r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
(r'0x[0-9a-fA-F]+', Number.Hex),
(r'[0-9]+', Number.Integer),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment