language-python icon indicating copy to clipboard operation
language-python copied to clipboard

SQL syntax coloring for string literals in Python

Open lpietrobon opened this issue 6 years ago • 0 comments

Prerequisites

  • [ X] Put an X between the brackets on this line if you have done all of the following:
    • Reproduced the problem in Safe Mode: http://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
    • Followed all applicable steps in the debugging guide: http://flight-manual.atom.io/hacking-atom/sections/debugging/
    • Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
    • Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
    • Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages

Description

I am loving the Python module for syntax coloring, It's working like a charm. The only bit that I am missing from the older MagicPython is syntax coloring of string literals (which come in handy when you have a bunch of regex code). Attaching here 2 snapshot to illustrate the difference between syntax coloring as a default and on string literals.

screen shot 2018-04-12 at 11 04 44 am screen shot 2018-04-12 at 11 04 31 am

The older module Magic Python had the ability to recognize syntax in the literals, too, and it would simply use a different palette for the colors. Would it be possible to have syntax recognition on string literals for the new Python module, too?

Steps to Reproduce

See screenshots attached

Expected behavior: SQL syntax recognized (and properly colored) in string literals

Actual behavior: SQL syntax recognized (and properly colored) only in strings, not in string literals

Reproduces how often: Every time I turn a string into a string literal (eg by pre-pending an r to the """-block

Versions

Atom : 1.25.1 Electron: 1.7.11 Chrome : 58.0.3029.110 Node : 7.9.0

lpietrobon avatar Apr 12 '18 19:04 lpietrobon