Python highlighting is broken for some triple quote docstrings
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: https://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: https://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
Python highlighting is a bit broken with regard to triple quotes, see below.
Steps to Reproduce
- Open a new file with Ctrl+N
- Set to Python grammar using a button in bottom right.
- Enter following text:
code:
class A:
@classmethod
def first(cls, iterable):
"""
'REPLACE'
"""
pass
def other(self):
pass
Expected behavior:
I expect the text between triple quotes (including them) to be colored as strings. Text that follows second triple quote should be highlighted as code.
Actual behavior:
All text following second triple quote till the end of file will be highlighted as a string.

Reproduces how often:
Everytime.
Versions
Atom : 1.28.1 Electron: 2.0.4 Chrome : 61.0.3163.100 Node : 8.9.3 OS: Ubuntu 18.04
Having the same issue on Windows 10.
In my case, it only happens after a docstring which has single quotes ' within the docstring.
As is the case in the screenshot above.
Edit: Nevermind, it doesn't always happen under those conditions.
Still is broken on 1.48.0, at least if you use Kite, which requires the tree-sitter parse to be disabled.
Seeing this issue still in Atom v1.54.0 on Mac OS 10.15.7 (Catalina).