Skip to content

Syntax highlighting breaks when typeof is followed by !== in v-if #5370

Open
@rijenkii

Description

@rijenkii

Vue - Official extension or vue-tsc version

Unknown, Reproduced in playground

VSCode version

N/A, Reproduced in playground

Vue version

3.5.14

TypeScript version

5.8.3

System Info

N/A

package.json dependencies

N/A

Steps to reproduce

  1. Create a .vue file
  2. Write following into it:
    <template>
      <template v-if="typeof 'string' === 'string'">
        <!-- Syntax highlighting is correct -->
      </template>
    
      <template v-if="typeof 'string' !== 'number'">
        <!-- Syntax highlighting is very broken -->
      </template>
    </template>

What is expected?

File to be correctly highlighted

What is actually happening?

Image

Link to minimal reproduction

https://play.vuejs.org/#eNqNUtFqwjAU/ZXsvvhiM4YKQ9bBNnzYHrYxx54Co9ZrjaZJSG67ivjvSyp2DkR8KPSec27OySFbeLCW1xXCGO4IS6sywnuhGesmVidykQqgjUWzYD1PTuqix9I07QYB7U7YukoSNt1oyhq2lMVShY+CgknPcuMc5sSSZG9wfeR3keNVdNRVOUN3mWONbsNmzqxRn3T9N0AfyOdGL2TBV97o0Mg2bgjITWmlQvdmSRrtBYxZy0QuU8r8vLQYuQr7BzxfYr4+ga98EzEB7w49uhoFdBxlrkDa05PpKzbhvyNLM69UUJ8hP9AbVcWMe9ljpech9pGuTftcWuNiRZ9+0hBqf7hUDBqVu1YvIDyLpzNX/4s74MN2T+hdaPE71B7PDAUO+IjfDCNG/qtDR/yWD2D3CyZNzds=

Any additional comments?

After creating the issue I've noticed that syntax highlighting is also broken in github. Funny.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions