-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Headline Level in API Doc Comments #20863
Comments
Triage: this is still pretty messed up. See https://gsnedders.html5.org/outliner/process.py?url=http%3A%2F%2Fdoc.rust-lang.org%2Fstd%2Fvec%2F for example. |
@rust-lang/rustdoc do we ever plan on addressing this? |
Wow, it's been two and a half years! Looking back at this, this still seems quite easily fixable by replacing a bunch of divs. |
I'm afraid that the content "flow" would get out of hand: either we reduce sub-elements width or we remove the right side limit (which will end up in reducing sub-elements width in any case). Not really sure this is a good idea... |
Huh? I don't follow, @GuillaumeGomez. This is about changing the markup, not the design? |
You add indent for every new sub-item. The space limit will get reached very quickly, that's why I'm not sure this is a good idea for rustdoc. |
Can't we change the style to make sub-items not add indent? This is a suggestion that should make no difference on the visual styling of the rendered HTML. Will replacing a |
@QuietMisdreavus Guillaume and I chatted about this in September after the comments above: https://discordapp.com/channels/442252698964721669/459149231702278154/494060795450097664 |
I think this has since been fixed. E.g., "Examples" in |
The API docs seem semantically quite nice, but don't incorporate headlines in comments into their document outline. The
Vec
doc e.g. uses anh1
for the title,h2
for "Methods",h3
s for impl names andh4
s for item names. Then a comment contains anh1
("Examples") and the outline is ruined.(This is a rustdoc issue, with probably low priority. It came up in #20826.)
One possibility to fix this is to switch to
section
andarticle
tags as described by HTML5—currently, everything is adiv
. You can find some documentation here. Basically, this allows markup like the following to be meaningful:(This syntax is Jade, it shows the outline quite niceley. I replaced some characters to prevent escaping.)
The text was updated successfully, but these errors were encountered: