Solved: comments in fields

I notice that each widget has a comments field and I am using it extensively, it is very useful.

I have a widget that references an IP address. Sometimes, for debugging, I point it to localhost.

This is my usual command:

[
  "192.168.0.123",
  50000,
  "Volume",
  "50"
]

This is when I debug:

[
  "127.0.0.1",
  50000,
  "Volume",
  "50"
]

I try to save both values together, one as a comment to easily switch:

[
  "192.168.0.123",
//  "127.0.0.1",
  50000,
  "Volume",
  "50"
]

But any line that that begins with // is automatically deleted.

Understandable, I guess... But also in the comments field?

I am hoping to keep comments in the comments field that start with, well.. a comment prefix: //.

Can I request that the comments field is excluded from the usual parsing and tidying from the application so that I can use it as I see fit?

hi,

and multiline comments applied to a single line ?
/* comments */ ?

Thanks.. Nope, multiline comments, applied to either a single line or a block, vanish too :frowning:

You can wrap it in a #{} block to preserve comments:

#{[
  1,
  2,
  // 3
]}

Thanks. Can I ask for your reasoning why comments are not preserved?

When possible, properties are interpreted as javascript primitives or JSON objects. Objects are then stringified again to be rendered with a normalized indentation (it also turns single quotes into double quotes in object keys for example), comments can't be preserved in the process unfortunately.

Thanks for the clarification.