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

JavaScript string with a double slash in HTML attribute will display as a comment #105779

Closed
Namorzyny opened this issue Sep 1, 2020 · 2 comments
Assignees
Labels
grammar Syntax highlighting grammar upstream-issue-linked This is an upstream issue that has been reported upstream

Comments

@Namorzyny
Copy link

  • VSCode Version: 1.48.2
  • OS Version: Microsoft Windows [Version 10.0.19041.450]

Steps to Reproduce:

  1. Input some code like: <input type="button" value="text" onclick="location.href='https://www.google.com'">
  2. The code will display as a comment:

コメント 2020-09-01 083349

Does this issue occur when all extensions are disabled?: Yes

@aeschli
Copy link
Contributor

aeschli commented Sep 1, 2020

The embedded JavaScript grammar acts strange here.
It's in scope string quotes.single.js but seems to end that scope at :

image

@alexr00
Copy link
Member

alexr00 commented Sep 29, 2020

Not sure what's going on here. It only occurs if the // is in there. The character before the // will get invalid.illegal.newline.js but I don't know why. Opened an issue for the owners of the html grammar to see if they know more: textmate/html.tmbundle#113

@alexr00 alexr00 closed this as completed Sep 29, 2020
@alexr00 alexr00 added upstream-issue-linked This is an upstream issue that has been reported upstream grammar Syntax highlighting grammar labels Sep 29, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Dec 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
grammar Syntax highlighting grammar upstream-issue-linked This is an upstream issue that has been reported upstream
Projects
None yet
Development

No branches or pull requests

3 participants