-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Doc comment block should strip leading asterisk (*) #1759
Comments
Triage: this still happens. |
This was a bug in Rust nightly itself at some point as well (rust-lang/rust#92872). Since this comment type is shorthand for the |
Relevant code is here rust-analyzer/crates/hir-def/src/attr.rs Lines 208 to 233 in 9814d79
and here (though this we might be able to skip out on) rust-analyzer/crates/hir-def/src/attr.rs Lines 449 to 492 in 9814d79
|
In looking at
struct ClientCapabilities
of lsp-types defined asI noticed that hover shows the comment as
In looking at https://docs.rs/lsp-types/0.61.0/lsp_types/struct.ClientCapabilities.html we can see that it's rendered without the leading asterisk (or bullet in markdown).
My initial thought was that maybe we need to strip leading
*
off of block dock comments if present inDocCommentsOwner::doc_comment_text
but that could also end up stripping markdown. Maybe it should be done informat_docs
instead when we look for markdown... but by then we've lost all knowledge of the comment except for it's string contents.The text was updated successfully, but these errors were encountered: