Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

empty brackets in docstring breaks highlighting #252

Open
fletchapin opened this issue Apr 18, 2018 · 5 comments
Open

empty brackets in docstring breaks highlighting #252

fletchapin opened this issue Apr 18, 2018 · 5 comments

Comments

@fletchapin
Copy link

screen shot 2018-04-18 at 7 00 02 pm

screen shot 2018-04-18 at 6 59 53 pm

This wasn't happening in other files, but for this script if a set of brackets are left empty in the docstring it breaks the highlighting for the rest of the file

@50Wliu
Copy link
Contributor

50Wliu commented Apr 27, 2018

@fletchapin I'm having some trouble reproducing this - could you please provide a code snippet that reproduces the issue? Thanks!

@fletchapin
Copy link
Author

I figured out it occurs when I put the raw string tag r in front of the docstring. You can see this in the screenshots below.

screen shot 2018-05-02 at 9 16 53 pm

screen shot 2018-05-02 at 9 17 05 pm

@jscissr
Copy link

jscissr commented May 21, 2018

The simplest repro case is this:

r'''[]'''
4

Any code after r'''[]''' is not highlighted like it should, in this case the 4.
I'm wondering why brackets in strings are even highlighted.

@alexjurkiewicz
Copy link

alexjurkiewicz commented May 22, 2018

I can repro this in Atom 1.27.0:

Expected:

print()
r"""[ """
print()

Actual:
screen shot 2018-05-22 at 1 56 29 pm

MagicPython package handles this correctly:
screen shot 2018-05-22 at 1 57 42 pm

@adrn
Copy link

adrn commented Oct 22, 2018

I see this too. I only run in to this issue with raw strings -- if you remove the r it seems to work as expected.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants