Skip to content
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 support for [ul] tags in documentation #67037

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

RedMser
Copy link
Contributor

@RedMser RedMser commented Oct 7, 2022

Previously, unordered lists were only rendering properly in RST format (RST defines them as any line starting with - or * or +). In Godot's documentation viewer and rich tooltips, they showed up as plain text.

This PR adds support for the [ul] tag in documentation, which is how unordered lists are declared in RichTextLabel:

**OLD SYNTAX**
- First
- Second

**NEW SYNTAX**
[ul]
First
Second
[/ul]

Of course, RST support had to be added back as well, by converting [ul] tags back to old syntax.

The alternative solution would be to keep old syntax, and to convert it to [ul] lists for EditorHelp, as is done in #88900

In a second commit, the new tag is used everywhere in the class docs. I'll resolve conflicts once code review is done.


I don't have the RST -> HTML build setup, so I can't verify the result of the following edge case in the conversion:

- :ref:`Node._shortcut_input<class_Node_method__shortcut_input>`\ 
- :ref:`Node._unhandled_input<class_Node_method__unhandled_input>`\ 
- :ref:`Node._unhandled_key_input<class_Node_method__unhandled_key_input>`\ 

where each line ends with <backslash><space>.

@RedMser RedMser requested a review from a team as a code owner October 7, 2022 16:56
@Calinou Calinou added this to the 4.0 milestone Oct 7, 2022
@YuriSizov YuriSizov modified the milestones: 4.0, 4.1 Feb 10, 2023
@YuriSizov YuriSizov modified the milestones: 4.1, 4.2 Jun 14, 2023
@RedMser
Copy link
Contributor Author

RedMser commented Feb 29, 2024

Once I get to rebase, I can look into supporting [ol] as well. Ordered lists are already used in these files:

PhysicsServer2D, PhysicsServer3D, SceneTree and there are some "in the following order" lists which should likely use numbers as well in Viewport, Node.

But work on this PR also depends on whether #88900 's approach is preferred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unordered/ordered list tags don't work in auto-created documentation
5 participants