hvesalai / emacs-scala-mode

The definitive scala-mode for emacs
http://ensime.org
GNU General Public License v3.0
362 stars 68 forks source link

Fix Fontification of Interpolation Strings in some Circumstances #177

Open LaurenceWarne opened 1 year ago

LaurenceWarne commented 1 year ago

Hi, this PR fixes fontification of interpolation strings in circumstances where the $ character appears more than once in sequence, for example before: interpolation-strings-before After: interpolation-strings-after

Essentially, scala-syntax:interpolation-re has been tweaked so that it only matches $ at the start of the string, and only the last dollar sign in expressions where an odd number of dollar signs occur. Could also fontify $$ in interpolation strings to make it clear they're special.

lmk what you think, hopefully I've caught all the edge cases. Thanks, Laurence

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.