This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Optional chaining not supported in embedded script #640
Description
Prerequisites
- Put an X between the brackets on this line if you have done all of the following:
- Reproduced the problem in Safe Mode: http://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: http://flight-manual.atom.io/hacking-atom/sections/debugging/
- Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
- Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
- Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
Optional chaining is currently supported in Javascript files, but not in embedded script (<script>
tag in HTML). It is currently treated as a ternary operator which breaks the detection of the closing tag </script>
since a colon is expected.
I first reported the issue to language-vue
to finally realized it was the case for all embedded scripts:
hedefalk/atom-vue#97
Steps to Reproduce
- Open a HTML file
- Within a
<script>
tag, use the optional chaining operator (i.e.window.test?.something
)
Expected behavior: Closing script tag detected
Actual behavior: Closing script tag not detected
Reproduces how often: Always
Versions
Atom: 1.32.2 upgraded to 1.34.0
OS: macOS Mojave version 10.14.3 (18D109)
Metadata
Metadata
Assignees
Labels
No labels