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

Indented script tag in html file breaking syntax highlight #32

Open
sueharaluke opened this issue May 15, 2018 · 4 comments
Open

Indented script tag in html file breaking syntax highlight #32

sueharaluke opened this issue May 15, 2018 · 4 comments

Comments

@sueharaluke
Copy link

sueharaluke commented May 15, 2018

For some reason, the following example breaks the syntax highlight inside a html file.

<html>
<head>
  <script>
  </script>
</head>
<body>
  
</body>
</html>

But these examples work just fine.

  1. When script closing tag is not indented.
<html>
<head>
  <script>
</script>
</head>
<body>
  
</body>
</html>
  1. When there is some coding before the closing tag.
<html>
<head>
  <script>
  console.log("")</script>
</head>
<body>
  
</body>
</html>

Anyway, had to disable the plugin for now, but still hoping someone can find the problem/fix.

Thanks !

ps. This started after recent updates from VS Code. (around a month ago ?)

@iemadk
Copy link

iemadk commented Oct 14, 2018

+1

it also work if you put a random type

<html>
<head>
  <script type="abc">
  </script>
</head>
<body>
  
</body>
</html>

@joshpeng
Copy link
Owner

This extension only contributes JavaScript. This looks to occur when upstream VSCode's HTML syntax tries to embed JavaScript and thus gets the JSX syntax highlighting pattern matches.

@iemadk
Copy link

iemadk commented Oct 17, 2018

@joshpeng So there is no way you can handle this? or no plan to support it? because it is a small addition that would remove the frustration 😅

@ben-w-smith
Copy link

Alternatively is there a HTML syntax plugin that we could use to correct this bug?

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

4 participants