Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighting breaks after HTML <script> tag #71

Closed
loqusion opened this issue Jun 16, 2020 · 5 comments
Closed

Syntax highlighting breaks after HTML <script> tag #71

loqusion opened this issue Jun 16, 2020 · 5 comments

Comments

@loqusion
Copy link

loqusion commented Jun 16, 2020

Describe the issue
If a line of JavaScript within a script tag in HTML doesn't end in a semicolon, it sometimes breaks the syntax highlighting for the rest of the file.

Screenshot of Current Behavior
image
image
image

Sample Code to Reproduce

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
  <script>
    require("source-map-support/source-map-support.js").install()
  </script></head>
  <body>
    <div id="app"></div>
  </body>
</html>
@loqusion loqusion changed the title JavaScript without semicolon breaks syntax highlighting in HTML (sometimes) Syntax highlighting breaks after HTML <script> tag Jun 17, 2020
@sevenseacat
Copy link

why was this closed? I'm still seeing it as a problem :(

@loqusion
Copy link
Author

loqusion commented Dec 7, 2020

Oops, I don't remember why I closed it.

@loqusion loqusion reopened this Dec 7, 2020
@michaelgmcd
Copy link
Owner

Only looked into this briefly, but adding a semi-colon after install() fixes the issue. I'll continue to investigate when I can.

@michaelgmcd
Copy link
Owner

In short, this is a pretty difficult issue to debug. I believe it was introduced in #56. Handling flow-type arguments has added quite a bit of complexity to function and method calls.

@michaelgmcd
Copy link
Owner

Try this out in 0.0.35 and let me know if this still exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants