DEV Community

Discussion on: RIP Copy and Paste from Stackoverflow! 🚨 (+Trojan Source Solution)

Collapse
 
swiknaba profile image
Lud • Edited

Not the main reason, but one of the reasons I use Gremlins in VSCode: marketplace.visualstudio.com/items...

As you see in my screenshot, with this extension, my VSCode will detect the invisible chars.

dev-to-uploads.s3.amazonaws.com/up...

Mainly I need that, because I accidentally hit cmd + space when I'm typing fast, which results in a space that looks like a normal space, but is a non-ASCII char that can break code.

Other than that, I hope you will never use a negative check like access_level != "user" for real, since that will lead to side effects, once you have more access levels next to "admin" and "user" or any form of typos. Always make the check explicit: access_level == "admin".

Collapse
 
bytehide profile image
ByteHide

Thanks for discovering Gremlins, I liked it!

Regarding using the negative, yes, I wouldn't use it either but that was the example of the official article and the github repo, I just based on it.

Regards!

Some comments have been hidden by the post's author - find out more