Skip to content
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

@pmrotule

Description

@pmrotule

Prerequisites

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

51517628-a99b7a80-1e1b-11e9-8465-c8dec87ee902

Steps to Reproduce

  1. Open a HTML file
  2. 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions