larasqp
September 3, 2024, 4:39am
1
The issue is how to use square brackets in comments. Clearly, they must be escaped somehow because they are used by the tags as explained here:
In GDScript, comments can be used to document your code and add descriptions to the members of a script. There are two differences between a normal comment and a documentation comment. Firstly, a d...
This works in Godot:
## This is [code]enemy.weapon[/code]
This does not work in Godot:
## This is [code]enemy["ugly"].weapon[/code]
So, how do we escape the characters [
and ]
?
Backslashes do not seem to work.
Thank you all.
Are you looking for this?
1 Like
larasqp
September 3, 2024, 5:13am
3
Thank you for the quick reply but [lb]b[rb]
does not work for me. I cannot say why. The hint shows lb b rb
.
Maybe the problem is that I am using VSCode.
The workaround is to use the tag [codeblock]
which also performs syntax coloring. But I still want to know the escape code if one exists.
2 Likes
I see, sometimes simple things can be difficult
1 Like
larasqp
September 3, 2024, 5:27am
5
No worries. I appreciate the effort.
sancho2
September 3, 2024, 8:09am
6
## This is [code]enemy["ugly"].weapon[/code]
For what its worth, I just tested this line in the GODOT editor and it works there.
So, yeah, it must be a VS Code thing.
1 Like
system
Closed
October 3, 2024, 8:09am
7
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.