-
-
Notifications
You must be signed in to change notification settings - Fork 2.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
Improve rendering of <code>
tags in documentation
#3411
Labels
Comments
Markdown rendering for things like doc popups is handled here: helix/helix-term/src/ui/markdown.rs Lines 181 to 299 in 8deaebd
For this snippet, the events in that loop look like Start(CodeBlock(Fenced(Borrowed("rust"))))
Text(Borrowed("core::convert\n"))
End(CodeBlock(Fenced(Borrowed("rust"))))
Start(CodeBlock(Fenced(Borrowed("rust"))))
Text(Borrowed("fn into(self) -> U\n"))
End(CodeBlock(Fenced(Borrowed("rust"))))
Rule
Start(Paragraph)
Text(Borrowed("Calls "))
Code(Borrowed("U::from(self)"))
Text(Borrowed("."))
End(Paragraph)
Start(Paragraph)
Text(Borrowed("That is, this conversion is whatever the implementation of"))
SoftBreak
Html(Borrowed("<code>"))
SoftBreak
Start(Link(Inline, Borrowed("https://doc.rust-lang.org/nightly/core/convert/trait.From.html"), Borrowed("")))
Text(Borrowed("From"))
End(Link(Inline, Borrowed("https://doc.rust-lang.org/nightly/core/convert/trait.From.html"), Borrowed("")))
Text(Borrowed("<T"))
Text(Borrowed("> for U"))
Html(Borrowed("</code>"))
Text(Borrowed(" chooses to do."))
End(Paragraph) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Describe your feature request
Documentation, at least for rust, can contain
<code>
tags, for example the documentation forinto()
from the standard library. The tags themselves should not be shown, and the text within should be shown the same as text within "`":The
<code>
and</code>
tags should not be shown and the text within them should be styled the same as theU::from(self)
from above.The text was updated successfully, but these errors were encountered: