vscode-stylus-supremacy icon indicating copy to clipboard operation
vscode-stylus-supremacy copied to clipboard

Weird comments behavior on v2.17.4

Open adrienWeiss opened this issue 2 years ago • 1 comments

Hello,

I am noticing a weird behavior with // comments on the VSCode extension v2.17.4

$var1 = 10px 
$var2 = 20px
// Hello
// I am a comment shifting position
$var3 = 30px
$var4 = 40px
// Hello
// I am disappearing
$var5 = 50px

Formatting this using stylus-supremacy CLI tool or demo keeps it intact, either using stylus-supremacy 2.15.0 or 2.17.3.

But using the latest v2.17.4 VSCode extension, this is the result :

// Hello
$var1 = 10px
$var2 = 20px
// Hello
$var3 = 30px
// I am a comment shifting position
$var4 = 40px
$var5 = 50px

I tried downgrading the extension to 2.17.3 and 2.16.1 but both do not seem to work.

v2.16.0 works as expected.

I'm not sure why, I don't know how VSCode extensions work, the only thing weird I'm noticing on the version comparison is the missing json5 dependency 🤷

Thank your for your work & your help

adrienWeiss avatar Dec 22 '22 11:12 adrienWeiss

I have the same issue. Every time I save, it moves the comment to another line, and will keep doing it until it reaches the end of the group and then puts it back at the top. Switching to v2.16 fixed it.

MalachiDraven avatar Feb 27 '24 16:02 MalachiDraven