Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #120 from syohex/string-interpolation-highlight

implement string interpolation highlight
  • Loading branch information...
commit cf96f6cb4cf21d6d713231c86040914509863a29 2 parents 8b1be11 + e5bb92d
@jart jart authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 coffee-mode.el
View
6 coffee-mode.el
@@ -418,6 +418,9 @@ called `coffee-compiled-buffer-name'."
(defvar coffee-regexp-regexp "\\/\\(\\\\.\\|\\[\\(\\\\.\\|.\\)+?\\]\\|[^/
]\\)+?\\/")
+;; String Interpolation(This regexp is taken from ruby-mode)
+(defvar coffee-string-interpolation-regexp "#{[^}\n\\\\]*\\(?:\\\\.[^}\n\\\\]*\\)*}")
+
;; JavaScript Keywords
(defvar coffee-js-keywords
'("if" "else" "new" "return" "try" "catch"
@@ -482,7 +485,8 @@ called `coffee-compiled-buffer-name'."
(,coffee-regexp-regexp . font-lock-constant-face)
(,coffee-boolean-regexp . font-lock-constant-face)
(,coffee-class-regexp 2 'coffee-mode-class-name)
- (,coffee-keywords-regexp 1 font-lock-keyword-face)))
+ (,coffee-keywords-regexp 1 font-lock-keyword-face)
+ (,coffee-string-interpolation-regexp 0 font-lock-variable-name-face t)))
;;
;; Helper Functions
Please sign in to comment.
Something went wrong with that request. Please try again.