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) regression: “for await“ highlighted as function instead of keyword #4235

Open
wolfgang42 opened this issue Mar 31, 2025 · 1 comment
Labels
bug help welcome Could use help from community language

Comments

@wolfgang42
Copy link

Describe the issue
In the statement for await (foo) {}, the keyword await is being incorrectly highlighted as a function since 063876f (#3940).

Which language seems to have the issue?
JavaScript

Are you using highlight or highlightAuto?
highlight

Sample Code to Reproduce

for await (foo) {}

Expected behavior
for await are both highlighted as keywords.

Additional context

I upgraded highlight.js and this stopped working. I bisected the problem to 063876f (#3940), but I don’t really understand the internals of highlight.js well enough to figure out why that code is being triggered in this position or what to do about it.

@wolfgang42 wolfgang42 added bug help welcome Could use help from community language labels Mar 31, 2025
@wolfgang42
Copy link
Author

(CC @cyfung1031 / @joshgoebel as author/committer of previous PR.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help welcome Could use help from community language
Projects
None yet
Development

No branches or pull requests

1 participant