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

Python highlighting is broken for some triple quote docstrings #264

Open

Description

@irmatov

Prerequisites

Description

Python highlighting is a bit broken with regard to triple quotes, see below.

Steps to Reproduce

  1. Open a new file with Ctrl+N
  2. Set to Python grammar using a button in bottom right.
  3. 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.
highlight

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

Activity

  1. Kilo59 commented on Sep 17, 2018

    @Kilo59

    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.

  2. yacc143 commented on Jul 1, 2020

    @yacc143

    Still is broken on 1.48.0, at least if you use Kite, which requires the tree-sitter parse to be disabled.

  3. kenecaswell commented on Feb 19, 2021

    @kenecaswell

    Seeing this issue still in Atom v1.54.0 on Mac OS 10.15.7 (Catalina).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions