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

JavaScript: Some keywords like "for" and "if" are mistakenly recognized as functions. #1934

Closed
HeySora opened this issue Mar 20, 2023 · 0 comments · Fixed by #1938
Closed
Labels
bugfix-request A request for a bugfix to be developed.

Comments

@HeySora
Copy link

HeySora commented Mar 20, 2023

Name of the lexer
Javascript

Code sample

if (something)
{
    console.log('something');
}

Additional context
if is mistakenly being treated as a function due to the parenthesis next to it.

The same happens to for, while, switch, and other keywords requiring a pair of parenthesis after.

Here is a preview with keywords in red, and functions in cyan:
image

@HeySora HeySora added the bugfix-request A request for a bugfix to be developed. label Mar 20, 2023
HeySora added a commit to HeySora/garden.heysora.net that referenced this issue Mar 21, 2023
nsfisis added a commit to nsfisis/rouge that referenced this issue Apr 3, 2023
tancnle pushed a commit that referenced this issue Apr 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix-request A request for a bugfix to be developed.
Projects
None yet
1 participant