Skip to content

Script comments breaks syntax highlighting #73

@valler

Description

@valler

Comments in script tags break syntax highlighting for most tokens inside the script tag. Some highlighting remains. I've marked the parts that are unexpectedly rendered as comments with the tilde character ~ in the related comments. In the given examples only the token call renders as expected. One would expect highlighting not to bleed into expressions at all.

html`<script>// ${123}</script>`
//  `<script>// ~~~~~~</script>`

html`<script>// ${obj.call("<hello world>")}</script>`
//  `<script>// ~~~~~~call~~~~~~~~~~~~~~~~~~</script>`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions