-
-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add syntax for documenting booleans: [true]
and [false]
#5299
Comments
There is no secret rule, it applies to all literals, be it true, false, null, numbers, quoted strings, etc. Adding special syntax for true, false, and null seems tempting, but it also doesn't bring much to the table, since there is no special case and nothing to link for them. |
That's true. It's mostly for "bolder", more interesting visualization, and making it easier to read and write for the developers behind the scenes. |
Another option is to use
|
To be honest, I don't think this is a good idea. Changing Keeping BBCode compatibility as much as possible can make better use of existing linting facilities in many editors. |
To add to @timothyqiu's concern, remember that third-party programs reading the class reference XML (such as LSP clients) also have to interpret the new keywords to render them correctly. Most of them have |
About that, you can make the same argument about class names which are formatted just the same way. It's not |
But the difference is that these literals are not documented, so having I'd also say it'd be confusing that |
Sorry for being stubborn on this but I seriously believe aiming for this, instead of writing down all consistent patterns presents class reference. Writing these values inside I reiterate the original feeling of this proposal, that is, it is so much more comfortable to contribute to the class reference with |
I'll chime in that this is clearly, self-evidently the better syntax for humans to read and write the class reference, but I'm still not sure it's worth the compatibility loss with other applications. I also quite like dalexeev's |
I'm starting to warm up to the idea of This comes at the cost of being a huge, and questionable effort to code, in practice. In comparison, |
Describe the project you are working on
Taking a look around the raw Documentation files.
Describe the problem or limitation you are having in your project
I've noticed that very, very frequently the documentation uses the following
It's like a bit of a secret rule: whenever true or false is mentioned in a boolean context, surround it with
[code]
. Despite being everywhere, I'm surprised it doesn't have its own special syntax. Recently, parameters have received their own[param]
syntax across the entire documentation, replacing their previously used[code]
, as well. It opened the door for more streamlined documentation.Describe the feature / enhancement and how it helps to overcome the problem or limitation
Allow writing
[true]
and[false]
as valid documentation, and replace the currently existing[code]true/false[/code]
. These could display like[code]
at first, but in the future they may have, for example, their own color, similar to the Script Editor's.Alternatively, give some special highlighting to
true
andfalse
whenever they're surrounded by code blocks.Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
If this enhancement will not be used often, can it be worked around with a few lines of script?
It cannot. It's something intrinsic to the engine.
Is there a reason why this should be core and not an add-on in the asset library?
The documentation code is core.
The text was updated successfully, but these errors were encountered: