Skip to content

Editor: Syntax highlighting is erroneous when string contains & #1103

Open
@EmilyOng

Description

@EmilyOng

Note: There is no error in evaluation.

Reproduction

Not OK

  1. When the string is xxxx&xxx
    const foo = "a&b is parsed as variable.language and "; is parsed as string.

Screenshot 2021-08-19 at 8 58 37 PM

const foo = "a&b";
  1. When the string is xxxx&

Screenshot 2021-08-19 at 8 58 06 PM

const foo = "a&";

This string matches the variable.language regex possibly.

OK

Screenshot 2021-08-19 at 8 50 35 PM

const foo = "ab";

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workinggood first issueEasy issues to get your feet wetminorless important than important but more than nice-to-have

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions