Incorrect bracket matching when JavaScript identifier contains $
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 65/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript
- Domain
- devtools
Research direction
Look at the bracket matching logic in the JavaScript editor, likely in a language server or syntax highlighting component. Start by searching for files handling bracket matching or tokenization for JavaScript. Reproduce the issue locally with the provided test case to confirm the bug. Check how '$' is being interpreted in identifiers and adjust the matching rules to treat it as part of an identifier, not a bracket.
Written by the indexing model from the issue text.
Description
In the JavaScript editor, bracket matching incorrectly associates an opening { with a $ character instead of the corresponding closing }.
This is reproducible in a completely new, empty .js file, so it does not appear to be related to the project, existing source code, or workspace configuration.
Steps to reproduce
- Create a new empty JavaScript file, for example
test.js. - Enter the following code:
function test() {
const $this = $(this);
}
- Place the cursor on the opening
{afterfunction test().
Actual result
The $ character in $this / $(this) is highlighted as the matching character.
For example:
function test() {
const $this = $(this);
^
The $ is highlighted instead of the closing }.
Expected result
The corresponding closing brace should be highlighted:
function test() {
const $this = $(this);
}
^
The $ character is valid in JavaScript identifiers and should not be treated as a bracket or matching character.
Additional information
The problem is reproducible with a completely new JavaScript file containing only the above code.
Try removing the $s from the file and I see that NO } is highlighted
Environment
- Eclipse IDE: 4.41
- Eclipse Wild Web Developer: 1.4.1.202608181434
- Feature:
org.eclipse.wildwebdeveloper.feature.feature.group - Operating system: Windows
- Language: JavaScript
Notes
The issue also occurs in existing JavaScript source code, including code using jQuery, but jQuery itself does not appear to be relevant because the minimal example above reproduces the problem.
The problem affects only the visual bracket matching/highlighting; the JavaScript code itself is valid.
- Dominant language
- Java
- Stars
- 203
- Forks
- 76
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 30
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from eclipse-wildwebdeveloper/wildwebdeveloper
-
Markdown and Astro language servers do not start when the project path contains a non-ASCII character or a spacePossibly taken @RoiSoleil claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
eclipse-wildwebdeveloper/wildwebdeveloper#2277 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
eclipse-wildwebdeveloper/wildwebdeveloper#2177 ·
Maintainers usually reply within 1 day
-
SQL Language serverOpenenhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
eclipse-wildwebdeveloper/wildwebdeveloper#2122 · 2 comments ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
eclipse-wildwebdeveloper/wildwebdeveloper#2070 · 1 comment ·
Maintainers usually reply within 1 day
-
ESLintLanguageServer and JSTSLanguageServer do not support node memory limits (--max-old-space-size)Open
Difficulty 3/5 1-2 days Newbie friendliness 48/100
eclipse-wildwebdeveloper/wildwebdeveloper#2027 · 2 comments ·
Maintainers usually reply within 1 day
All issues in eclipse-wildwebdeveloper/wildwebdeveloper
Similar issues
-
面渣逆袭Spring事务传播机制勘误Open
Difficulty 1/5 Under an hour Newbie friendliness 80/100
itwanger/toBeBetterJavaer#218 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
johanhaleby/occurrent#1462 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
SasanLabs/VulnerableApp#912 ·
Maintainers usually reply within 1 day
-
area/build area/events area/storage area/storage/kafkasql area/storage/sql
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Apicurio/apicurio-registry#11079 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
OpenAEV-Platform/openaev#9139 ·
Maintainers usually reply within 1 day