Permalink
Browse files

Fix for regexp literals with slashes in brackets.

Correctly highlight literals like /foo[/]bar/.
  • Loading branch information...
1 parent 1f9bc1a commit 88e1c8c75f8b6cd1249934cd5ad91565798fb2e8 @mooz mooz committed with Apr 12, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 coffee-mode.el
View
@@ -250,7 +250,7 @@ path."
(defvar coffee-boolean-regexp "\\b\\(true\\|false\\|yes\\|no\\|on\\|off\\|null\\)\\b")
;; Regular Expressions
-(defvar coffee-regexp-regexp "\\/\\([^\\]\\|\\\\.\\)+?\\/")
+(defvar coffee-regexp-regexp "\\/\\(\\\\.\\|\\[\\(\\\\.\\|.\\)+?\\]\\|[^/]\\)+?\\/")
;; JavaScript Keywords
(defvar coffee-js-keywords

0 comments on commit 88e1c8c

Please sign in to comment.