Groovy-Emacs-Modes / groovy-emacs-modes

A groovy major mode, grails minor mode, and a groovy inferior mode.
84 stars 39 forks source link

Support braced string interpolation after backslashes #142

Closed ryuslash closed 3 years ago

ryuslash commented 3 years ago

This change makes the syntax highlighting of braced string interpolation aware of escaped backslashes. If it finds an even number of backslashes it won't consider the $ to be escaped and highlight it as a variable.

I kept noticing that even when backslashes were escaped in Groovy (I have to work with quite a few Windows paths), variables wouldn't be highlighted.

ryuslash commented 3 years ago

I noticed today that I didn't fix this for slashy strings. I also added some tests for the slashy strings in general.

Wilfred commented 3 years ago

Thanks for the PRs with great tests @ryuslash :)