vscode-html-end-tag-labels icon indicating copy to clipboard operation
vscode-html-end-tag-labels copied to clipboard

Add javascript parser

Open sksundram opened this issue 4 years ago • 5 comments

Describe the bug This extension should not be working on JavaScript files. I wrote a simple for loop and it displays right below it.

To Reproduce This is the for loop that I wrote.

for (let i = 0; i < colors.length; i++) {
  console.log(colors[i]);
}
/.length

Expected behavior The /.length should not be displayed in JavaScript files.

Screenshots vscode_htmlExtension_js_bug

Desktop (please complete the following information):

  • OS: macOS
  • VSCode Version: 1.53.0
  • Extension Version: 0.6.0

sksundram avatar Feb 05 '21 08:02 sksundram

I'm getting the same. The extension seems to be kicking in when it sees a '<'. Possibly interpreting it as the start of a html tag.

mike-shields-dev avatar Mar 05 '21 18:03 mike-shields-dev

Thank you for reporting this issue. I will disable the extension in js files because initially it was added because of JSX support, but currently, we only have an HTML parser and parsing JS code with an HTML parser won't give us desired result.

anteprimorac avatar Mar 26 '21 13:03 anteprimorac

Tagging this issue as Stale.

github-actions[bot] avatar May 26 '21 00:05 github-actions[bot]

any update on this?

simonhermann avatar Jul 21 '21 17:07 simonhermann

Hi, I have the same issue with .ty Typescript Files - which are similar to js files mostly...

iDad5 avatar Aug 13 '22 13:08 iDad5

@sksundram @mike-shields-dev @iDad5, I've introduced basic support for JSX and React. Please, try it and let me know how it feels.

anteprimorac avatar Feb 01 '23 12:02 anteprimorac