You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
It seems the type attribute of the script tag isn't being properly checked in the latest version of Atom, resulting in the body of all script tags, regardless of type, being syntactically highlighted as JavaScript.
Steps to Reproduce
Open new file
Paste the following:
<script type="text/html">
<p>This is highlighted as having errors</p>
console.log('This is highlighted as being JS');
</script>
Switch language to HTML
Expected behavior: The body of the script tag should be highlighted as HTML, i.e. white carets with red p's on the <p>...</p> tag and all white on the console.log(...); line.
Actual behavior: The body of the script tag is highlighted as JavaScript, with teal carets on the aforementioned tag carets and proper JS highlighting on the console.log(...) line.
Looks like if that snippet is put in some minimal HTML e.g.:
<!DOCTYPE html><html><body><scripttype="text/html"><p>This is highlighted as having errors</p>console.log('This is highlighted as being JS');</script></body></html>
Then I can reproduce initially, but after saving as a .html file and reopening, it works ok. If the code snippet is in a .html file on its own, then I see the issue there as well.
Doesn't reproduce with Tree-sitter disabled though.
Reproduces how often: Always
Versions
Atom: 1.33.1
APM: 2.1.2
OS: Windows 10 Pro v1803
Additional Information
Any additional information, configuration or data that might be necessary to reproduce the issue.
The text was updated successfully, but these errors were encountered:
Thanks for the report - reproduced on 1.33.1 on macOS 10.12.6. Looks like if that snippet is put in some minimal HTML e.g.:
<!DOCTYPE html><html><body><scripttype="text/html"><p>This is highlighted as having errors</p>console.log('This is highlighted as being JS');</script></body></html>
Then I can reproduce initially, but after saving as a .html file and reopening, it works ok. If the code snippet is in a .html file on its own, then I see the issue there as well.
Doesn't reproduce with Tree-sitter disabled though.
Prerequisites
Description
It seems the type attribute of the script tag isn't being properly checked in the latest version of Atom, resulting in the body of all script tags, regardless of type, being syntactically highlighted as JavaScript.
Steps to Reproduce
Expected behavior: The body of the script tag should be highlighted as HTML, i.e. white carets with red p's on the
<p>...</p>
tag and all white on theconsole.log(...);
line.Actual behavior: The body of the script tag is highlighted as JavaScript, with teal carets on the aforementioned tag carets and proper JS highlighting on the
console.log(...)
line.Edit by @rsese to add more observations from #223 (comment)
Looks like if that snippet is put in some minimal HTML e.g.:
Then I can reproduce initially, but after saving as a
.html
file and reopening, it works ok. If the code snippet is in a.html
file on its own, then I see the issue there as well.Doesn't reproduce with Tree-sitter disabled though.
Reproduces how often: Always
Versions
Atom: 1.33.1
APM: 2.1.2
OS: Windows 10 Pro v1803
Additional Information
Any additional information, configuration or data that might be necessary to reproduce the issue.
The text was updated successfully, but these errors were encountered: