-
-
Notifications
You must be signed in to change notification settings - Fork 247
Font-lock escape characters in strings #378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Are backslashes ever used for anything other than escape characters? If not, this should be easy to do. |
Oh of course, they're also used for character literals. In that sense, I don't know how to font-lock one and not the other. |
I think it's ok to use the same font-locking in both scenarios. You can also see how it's done here https://github.com/lunaryorn/puppet-mode/blob/master/puppet-mode.el#L175 |
Actually, looks like we already do that for regexp constructs. So it shouldn't be too hard to copy. |
Or do we actually prefer to also font-lock character literals differently? |
I guess using the same technique will do just fine. |
It'd be nice if we font-locked specially escape characters in strings - e.g. the
\n
in "this\nthat". This would make it easier to spot strings with embedded escape chars.I've seen this in some major modes, so I'm guessing it shouldn't be very hard to do.
The text was updated successfully, but these errors were encountered: