Comments in code boxes?

For the occasions where it would be nice to include a comment in one of the code boxes, I can't figure out how to do it without breaking whatever I'm trying to do. The cruel tease of it is that the editor clearly recognizes the comment, and grays it out; nevertheless, the output incorporates the comment and it either breaks the JS, or outputs the literal string of the comment, depending on code mode. I recall having a similar issue at one point trying to leave a -- comment in an SQL query.

Couple quickie examples attached.

At one point I thought {{ /* comment */ }} might work, alas, it doesn't.

Is there a way to effectively include comments in the code boxes that I'm not aware of? I couldn't find any other mentions of code box comments in the forum topics, or in the docs, outside of transformers (where comments do seem to work?).


Hi @Schteevynn, This isn't possible at the moment in Retool :confused: Would you mind changing this to a feature request?

Hi @everett_smith

Can a forum topic's category be changed after it's been posted? I've been clicking around for several minutes trying to flip this to "Feature Requests" but not finding a mechanism to do so.

Or do I recreate it as a new FR topic and close this one?

Hey, I went ahead and changed that category for you! :+1:

1 Like