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
{ after function 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.
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
.jsfile, so it does not appear to be related to the project, existing source code, or workspace configuration.Steps to reproduce
test.js.{afterfunction test().Actual result
The
$character in$this/$(this)is highlighted as the matching character.For example:
The
$is highlighted instead of the closing}.Expected result
The corresponding closing brace should be highlighted:
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
org.eclipse.wildwebdeveloper.feature.feature.groupNotes
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.