nortakales / vs-code-qalc

Interactive scratchpad calculator for VS Code
MIT License
70 stars 2 forks source link

Hex literals containing "c" are not evaluated correctly? #39

Closed clnhlzmn closed 2 months ago

clnhlzmn commented 2 months ago
image

I'm not sure what is going on here. Perhaps related to https://github.com/nortakales/vs-code-qalc/issues/23?

Just writing this down for now. I'll try to take a deeper look in a day or two and maybe I can figure out what's up.

clnhlzmn commented 2 months ago

Yeah indeed that is the problem. I'm ok with a workaround of disabling the temperature shortcuts for now.

Specifically this regex appears to match things like these hex literals containing "c", in some cases.

image

nortakales commented 2 months ago

I think I found a suitable regex replacement. It passes my current tests, and fixes hex strings. We'll see if anyone reports a different issue after the update 😅

nortakales commented 2 months ago

Fixed in 0.4.1

https://github.com/nortakales/vs-code-qalc/commit/59c16cdae7f4ce8f1d7fa3826f14015943056c00