Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix for regex literals with escaped slashes

  • Loading branch information...
commit 095e65ec95b69d6b2514632eae5267b33fccde3c 1 parent 5c5a414
@sstephenson sstephenson authored
Showing with 5 additions and 1 deletion.
  1. +1 −1  coffee-mode.el
  2. +4 −0 examples/edge.coffee
View
2  coffee-mode.el
@@ -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
View
4 examples/edge.coffee
@@ -0,0 +1,4 @@
+# Edge cases
+
+if string.match /\// or string.match /\x1b/ or string.match /a\/b/
+ console.log "matched"
Please sign in to comment.
Something went wrong with that request. Please try again.