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

bug in syntax of javascript #3985

Closed
FeelUsM opened this issue May 9, 2024 · 0 comments · Fixed by #3986
Closed

bug in syntax of javascript #3985

FeelUsM opened this issue May 9, 2024 · 0 comments · Fixed by #3986
Labels
C: Syntax T: bug A bug in an existing language feature

Comments

@FeelUsM
Copy link

FeelUsM commented May 9, 2024

Description of the bug

Wrong highlighting in JavaScript syntax in next code:

for (
    a in b,
        c ? d: e,
        f(g())
)
    h;

that leads to wrong code folding if similar fragment is in the code surrounding it

Steps to reproduce

  1. open new tab
  2. select language to JavaScript
  3. insert
for (
    a in b,
        c ? d: e,
        f(g())
)
    h;

Expected behavior

all parentheses has normal color

Actual behavior

two parentheses highlighted by red color as if this code has errors

Sublime Text build number

4169

Operating system & version

Windows 10

(Linux) Desktop environment and/or window manager

No response

Additional information

No response

OpenGL context information

No response

@BenjaminSchaaf BenjaminSchaaf transferred this issue from sublimehq/sublime_text May 9, 2024
@deathaxe deathaxe added T: bug A bug in an existing language feature C: Syntax labels May 9, 2024
deathaxe added a commit that referenced this issue May 9, 2024
Fixes #3985

This commit sets expression instead of expression-no-comma onto stack
after ternary expressions, so they can appear in the middle of sequences.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Syntax T: bug A bug in an existing language feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants