microsoft / vscode-html-languageservice

Language services for HTML
MIT License
226 stars 109 forks source link

Comment end confusion inside inline Javascript intellisense #151

Open yoonbuck opened 1 year ago

yoonbuck commented 1 year ago

It looks like inside a <script> block, the intellisense thinks --> can end a JavaScript block comment /* */ (although syntax highlighting does not.)

This means that errors/warnings can appear inside comments:

<script>
  /* --> a b
  */
</script>
image

And various other consequences of interpreting comments as code (setting types, entering blocks, etc.)

image

Hope this is the right place for this issue - it doesn't happen in standalone JS files - but happy to report elsewhere if this issue actually belongs there :smile: