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

Character "<" (Less-Than sign) color becoming red incorrectly on HTML document comment sections #26495

Closed
SDP190 opened this issue May 11, 2017 · 2 comments
Assignees

Comments

@SDP190
Copy link

SDP190 commented May 11, 2017

When i place a script tag in an html document, and then write two forward slashes to comment out the following line, if i'll then type the "<" (Less-Than sign) character on that line, as:
<script> //<
</script>
it becomes red in the VS Code Editor, instead of being green as usual with comments on javascript code.
first I thought that the reason is because "<" character is illegally used in a script tag since this may indicate the starting of a closing-tag, but when I try it in other IDEs they don't give me any error, and I believe that they are right.
Now I realized that the same problem occurs even with the script closing-tag itself, if it is placed right after the two fwd slashes, as:
<script>
//</script>
in the latter scenario the "<" character of the closing-tag becomes red.

See image:
image

  • VSCode Version: Code 1.12.1 (commit: f6868fc)
  • OS Version: Windows 10 (x64)

Update:
another issue i found is with "&" character (Ampersand sign), becoming red incorrectly, see image:
image2

@aeschli
Copy link
Contributor

aeschli commented May 12, 2017

Reproduced with

<html>
<head>
    <script>
    //dd<dd<dd
    </script>
    <script>
    /*dd<dd
    <*/
    </script>
     <script>
    //</script>
</head>
</html>

@aeschli
Copy link
Contributor

aeschli commented May 12, 2017

This issue was moved to textmate/html.tmbundle#66

@aeschli aeschli closed this as completed May 12, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants