Request - String literal formatting

Hi forum and devs,

I’ve noticed two things so far when working with literal strings in my text nodes.

The first is that the editor is highlighting keywords in strings despite being between [[]]. Perhaps a different highlight color when string literals are detected?

The second is that tabs in my literal strings are turning into ~ in my game. Don’t know if that’s a bug, a placeholder, or what.

Really liking the exploration of Defold so far!

1 Like

Yep, the code editor is still lacking in many ways. Is this a known issue @Ragnar_Svensson, @Ragnar_Dahlen, @mats.gisselson and @Erik_Angelin?

The tab character will be rendered as a single character, not as an indentation, and since it’s unlikely that the tab character actually exists in the font it will be replaced by the ~ placeholder character. Your best bet is to remove any tabs in your labels and text nodes.

1 Like

Tabs are easy enough to replace with five spaces, so that’s not a problem for me. I don’t use them all that often. :slight_smile:

1 Like

Hi! I’ve reported the incorrect handling of the [[...]] syntax here: https://github.com/defold/editor2-issues/issues/1032

4 Likes