Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
EmilyOng opened this issue Aug 19, 2021 · 3 comments
Open

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

EmilyOng opened this issue Aug 19, 2021 · 3 comments
Labels
Bug Something isn't working good first issue Easy issues to get your feet wet minor less important than important but more than nice-to-have

Comments

@EmilyOng
Copy link

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";
@martin-henz martin-henz added Bug Something isn't working minor less important than important but more than nice-to-have labels Nov 2, 2021
@martin-henz martin-henz added the good first issue Easy issues to get your feet wet label Dec 14, 2021
@martin-henz
Copy link
Member

This issue persists as of today.

@RichDom2185
Copy link
Member

Should we just remove our custom js-slang syntax highlighting and use default JS one? I don't really see it as a "core" feature to maintain our own syntax highlighting rules (it's only going to get worse if we want to maintain highlighting rules for the other languages).

@martin-henz
Copy link
Member

I think our syntax highlighting should reflect the focus on specific sublanguages, such as Source §1. Learners with prior knowledge are able to see quickly whether the feature they are using is included in the language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working good first issue Easy issues to get your feet wet minor less important than important but more than nice-to-have
Projects
None yet
Development

No branches or pull requests

3 participants