Skip to content

Commit

Permalink
Fix for regex literals with escaped slashes
Browse files Browse the repository at this point in the history
  • Loading branch information
sstephenson committed Sep 25, 2010
1 parent 5c5a414 commit 095e65e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion coffee-mode.el
Expand Up @@ -247,7 +247,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
Expand Down
4 changes: 4 additions & 0 deletions examples/edge.coffee
@@ -0,0 +1,4 @@
# Edge cases

if string.match /\// or string.match /\x1b/ or string.match /a\/b/
console.log "matched"

0 comments on commit 095e65e

Please sign in to comment.