rokucommunity / vscode-brightscript-language

A Visual Studio Code extension for Roku's BrightScript language
MIT License
110 stars 41 forks source link

Wrong highlighting if the last symbol in the string is a backslash #441

Closed vbuchii closed 1 year ago

vbuchii commented 2 years ago

It seems like the presence of a backslash in the string escapes the next character. And due to that all the following code is not properly highlighted:

Screenshot from 2022-10-20 21-35-22

TwitchBronBron commented 2 years ago

Hmm. I just tried to reproduce this, and it appears to be working fine for me. What version of vscode and the brightscript extension are you using? Notice how in your example, there are several other items that aren't colored correctly (such as someFunc being white instead of yellow, data is white instead of light blue, etc). Is htere something above your code that's causing the rest of the file to be parsed incorrectly?

image

vbuchii commented 2 years ago

@TwitchBronBron, thank you for the quick response. Just tried in an empty file and it looks the same for me.

VS Code:

Version: 1.72.2
Commit: d045a5eda657f4d7b676dedbfa7aab8207f8a075
Date: 2022-10-12T22:16:26.920Z
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Linux x64 5.14.0-1052-oem
Sandboxed: No

BrightScript Language extention: Screenshot from 2022-10-21 08-52-53

TwitchBronBron commented 1 year ago

Hmm. can you try uninstalling the extension and then re-installing the extension, and then restarting all of your vscode windows? I'd love to fix this if I can find a way to reproduce it. :)

vbuchii commented 1 year ago

Hmm. can you try uninstalling the extension and then re-installing the extension, and then restarting all of your vscode windows? I'd love to fix this if I can find a way to reproduce it. :)

Already did that a while ago and just tried to do it again, but unfortunately, it doesn't help. Anyway, thank you for trying to help :)

TwitchBronBron commented 1 year ago

If you've got some time, I'd love to help troubleshoot this. Could you send me a message in our RokuCommunity slack? We can set up a video screen share and I can see what's going on.

vbuchii commented 1 year ago

If you've got some time, I'd love to help troubleshoot this. Could you send me a message in our RokuCommunity slack? We can set up a video screen share and I can see what's going on.

Thanks @TwitchBronBron I wrote you in private.

TwitchBronBron commented 1 year ago

This issue was caused by having WillowTree's vscode-ide-brightscript extension installed alongside this one. Uninstalling vscode-ide-brightscript fixed the issue.

vbuchii commented 1 year ago

This issue was caused by having WillowTree's vscode-ide-brightscript extension installed alongside this one. Uninstalling vscode-ide-brightscript fixed the issue.

Thanks again for your help! I appreciate it.