Skip to content

HTML comments are not considered comments #781

@NotWearingPants

Description

@NotWearingPants

In JavaScript, HTML comments are a valid replacement for single line comments.
They are considered comments in Node.js, inline script tags, external js file, etc.

<!-- No comment.
// Comment.

Even GitHub doesn't seem to understand this syntax 🤔

Your grammar does not seem to support them, and mistakes them as a syntax error.

Link to the relevant part of the spec

In the spec this syntax appears under additional syntax for web browsers, yet you do support the other additional syntax in that section, such as legacy octal numeric literals and octal string escapes, but not HTML comments.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions