White text instead of color in CloudPebble editor

At some point while editing Javascript code in CloudPebble, the text no longer renders in colors but all white. The code is active given the portion of the face it codes for renders in the emulator.

The stuff above it is in red, green, and blue as expected, but anything below that is white. Tried typing new lines and they all come out all white.

Anything I can do about that?

Interesting, I copied a line or two from another project ( turns out this font has no “-” character, the original white colored code was fine ) and it renders in color.

Here’s a screen shot.

You seem to be using ` instead of ’
Use ’ for single quotes: I think you’ll have a better time getting the syntax highlighting to work.

` is the correct symbol to use with templated strings. OP is not trying to use single quotes since single quotes mean something else entirely

1 Like

Oop, my apologies. I was not aware. Thank you.

It is interesting that the part I copied into the white text region that came out in color is surrounded by ` punctuation marks.

I had the same thing happen to me a few days ago. Lines below one with back ticks lost the syntax colours.

Even though the back tick is correct, I did just copy the line from official examples I believe, it sounds like it couldn’t hurt to remove and replace it or something.

Yes, comment out a line with that format and the colors come back until the second instances of using the back tick.

Sounds like it is the correct punctuation, so maybe there’s an error in the editor?

Well, this works and the colors are back. I rather like the more compact version, but I like the color highlighted text even more.

// const timeStr = ${hoursStr}:${minutes};
const timeStr = hoursStr + “:” + minutes;

Why I didn’t make that “minutesStr” I can’t say. May retype it just for forms sake.

I’ve submitted a bug report in GitHub for this: Templaned strings break syntax highlighting · Issue #71 · coredevices/cloudpebble · GitHub