facelessuser / BracketHighlighter

Bracket and tag highlighter for Sublime Text
https://facelessuser.github.io/BracketHighlighter/
1.75k stars 245 forks source link

Unable to match the corresponding bracket if there is an inner arrow function using JavaScript in HTML #587

Closed matcls closed 3 years ago

matcls commented 3 years ago

Description

Using JavaScript in HTML, if there is an arrow function between the brackets BH does not find the respective bracket.

The image shows first without the arrow function and then using the arrow function.

BH Arrow Function Brackets

...

Steps to Reproduce Issue

  1. Copy/Paste the HTML snippet below
  2. Place the caret in the first bracket.
  3. BH does not find the matching bracket
<html lang="en" dir="ltr">
<body>
    <script type="application/javascript">
        if (info.readyState === 4 && info.status === 200) {
            data.forEach((post) => {
                addPostRow(post);
            });
        }
    </script>
</body>
facelessuser commented 3 years ago

This was brought up recently and is due to a recurrent change in JavaScript scoping in the syntax highlighting.

I had a fix, but forgot to commit it 🙃. I will try and get the fix in the weekend.