wallabyjs / quokka

Repository for Quokka.js questions and issues
https://quokkajs.com
1.18k stars 31 forks source link

Bug when displaying template literals in VsCode #911

Closed TriupLauro closed 1 year ago

TriupLauro commented 1 year ago

Issue description or question

Is this issue related to Quokka not outputting the expected results of your code?: Yes/No

Sample code

The file is named quokkaSandbox.ts (this is typescript)

const normalString = "This is a string"

console.log(normalString)

const templateLiteral = `This is a template literal ${normalString}`

function justAfunction() {
    const number = 10
    console.log(templateLiteral, number)
}

justAfunction()

Sample repository link

If the issue can not be reproduced just using the quokka file above (for example because it requires/imports some files from your project), please create a small repository where the issue can be reproduced.

Quokka.js Console Output

// paste your quokka console output here

Code editor version

Visual Studio Code v1.84.2

OS name and version

Ubuntu 22.04 on WSL on Windows 10

When the Quokka extension is activated on VsCode, the color of the strings is applied to all text after a template literal with interpolation.

image

It stops if there is a double quote before the back quote

image

How it is displayed with Quokka deactivated

image

In all of these screenshots, Quokka is not yet started anywhere.

LennardFi commented 1 year ago

I have the same issue. I can't use the extension until this issue is fixed.

NikGovorov commented 1 year ago

Thanks for providing the detailed set of steps to reproduce the problem. We were able to duplicate the problem and have released a new version of Quokka for VS Code that fixes the problem (v1.0.582).