-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Infer and allow BBcode lists [ul]
in class reference generation
#88900
base: master
Are you sure you want to change the base?
Infer and allow BBcode lists [ul]
in class reference generation
#88900
Conversation
[ul]
in built-in generation[ul]
in class reference generation
Co-Authored-By: RedMser <5117197+redmser@users.noreply.github.com>
394d7e3
to
a9487c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, it works as expected.
Note that nested lists are not supported by this code though. The following in the XML:
- List
- Nested
- Item
- More nested
- Less nested
- Even less nested
Results in:
I don't recall seeing nested lists in the XML class reference, but it's worth keeping in mind for custom class reference from scripts and should be documented once we make a PR for godot-docs.
The moment nested lists will be supported is when the class reference will adopt the same syntax as GitHub's markdown which would be... wow. Out of guilt, I must note that there is a situation where the current code would break: since |
I think it's better to update the docs and not add the inferring. Or this should be done not by a simple replacement, but take into account the context of ## [codeblock]
## - A
## - B
## - C
## [/codeblock]
func _run() -> void:
pass
This is due to incomplete RST markup escaping. |
I'd rather have it account the context better, then. But in all honestly the generation code is quite "spaghetti" as is and I wish it weren't so this addition could've been integrated more naturally. |
I'm not sure if multiple ways to do the same is a good thing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Needs work. Personally I would prefer Add support for
[ul]
tags in documentation #67037.
How comfortable would you be if this came along with some form of support for GitHub Flavoured Markdown-styled writing for the class ref? I myself right now am heavily in support of the PR as is, assuming it is done in the least "hacky" way. I want existing documentation to be able to remain as is, and I want documentation to be easy to backport. |
Supersedes #67037
I've had these two screenshots on my desktop for the past 2 weeks and I forgot to create this PR:
This PR allows the
[ul]
to be used in custom script's class reference generation. However, unlike #67037, it also infers a list based on whether or not a line starts with-
.Why like this?
make_rst.py
already does this, whether it's intentional or not.(Only reason this is marked for 4.3 is because the prior PR was, too)