Skip to content

Commit

Permalink
Merge 26cc16d into 09226f8
Browse files Browse the repository at this point in the history
  • Loading branch information
Wilfred committed Oct 31, 2019
2 parents 09226f8 + 26cc16d commit fc10fbe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion groovy-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ of the form /foo/)."
(or bol
(or "+" "-" "=" "+=" "-=" "==" "!="
"<" "<=" ">" ">=" "&&" "||" "?" "?:" ":"
"=~" "==~" "<=>" "(" "~"))
"=~" "==~" "<=>" "(" "~" ","))
(0+ whitespace)
"/"
eol)
Expand Down
6 changes: 6 additions & 0 deletions test/groovy-unit-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,12 @@ final int foo = -1;"
(forward-char -1)
(should (not (memq 'font-lock-string-face (faces-at-point))))))

(ert-deftest groovy-highlight-slashy-string--comma ()
"Allow slashy strings as later arguments."
(with-highlighted-groovy "text.replaceAll(abc, /foo/)"
(search-forward "foo")
(should (memq 'font-lock-string-face (faces-at-point)))))

(ert-deftest groovy-highlight-slashy-string--inner-dollar ()
"Don't get confused by slashy-strings that contain $."
(with-highlighted-groovy "x = /$ foo $/"
Expand Down

0 comments on commit fc10fbe

Please sign in to comment.