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

HTML Javascript Syntax Highlighting bug #100668

Closed
Jose134 opened this issue Jun 20, 2020 · 4 comments
Closed

HTML Javascript Syntax Highlighting bug #100668

Jose134 opened this issue Jun 20, 2020 · 4 comments
Assignees
Labels
grammar Syntax highlighting grammar upstream-issue-linked This is an upstream issue that has been reported upstream

Comments

@Jose134
Copy link

Jose134 commented Jun 20, 2020

highlightingBug
The first </script>, the HTML comments and the code of the script at the bottom don't get correctly highlighted

(This code is right before the end of the body and html tags at the end of the file)

  • VSCode Version: 1.46.1
  • OS Version: Windows_NT x64 10.0.18363
    As it appears on VSCode's About dialog

Steps to Reproduce:

  1. Write the following code in a HTML file
<!-- Insert this line above script imports  -->
        <script> if (typeof module === 'object') { window.module = module; module = undefined; } </script>

        <!-- Black Dashboard JS dependencies -->
        <script src="black-dashboard/assets/js/core/jquery.min.js" type="text/javascript"></script>
        <script src="black-dashboard/assets/js/core/popper.min.js" type="text/javascript"></script>
        <script src="black-dashboard/assets/js/core/bootstrap.min.js" type="text/javascript"></script>
        <script src="black-dashboard/assets/js/plugins/perfect-scrollbar.jquery.min.js"></script>
        <script src="black-dashboard/assets/js/plugins/chartjs.min.js"></script>
        <script src="black-dashboard/assets/js/plugins/bootstrap-notify.js"></script>
        <script src="black-dashboard/assets/js/black-dashboard.js?v=1.0.0" type="text/javascript"></script>

        <!-- Insert this line after script imports -->
        <script> if (window.module) module = window.module; </script>

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

@gjsjohnmurray
Copy link
Contributor

First recommendation is to update to the current release (1.46.1) and retest.

@Jose134
Copy link
Author

Jose134 commented Jun 21, 2020

First recommendation is to update to the current release (1.46.1) and retest.

I've just tested on the latest version and also in VSCode insiders (1.47.0). The bug was still there on both versions.

@aeschli aeschli assigned alexr00 and unassigned aeschli Jun 22, 2020
@alexr00
Copy link
Member

alexr00 commented Jun 22, 2020

Looks like the javascript scope is leaking out of script tags
image

@alexr00
Copy link
Member

alexr00 commented Jun 22, 2020

Duplicate of textmate/html.tmbundle#85, which is about javascript scope leaking out.

@alexr00 alexr00 closed this as completed Jun 22, 2020
@alexr00 alexr00 added grammar Syntax highlighting grammar upstream-issue-linked This is an upstream issue that has been reported upstream labels Jun 22, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Aug 6, 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

4 participants