-
Notifications
You must be signed in to change notification settings - Fork 385
ANN: highlight emphasis and strong emphasis in rustdocs #7347
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
Conversation
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.
What's about ~~struckout text~~
? I know that it's a less common formatting case than Italic and bold, but it looks like it's quite easy to support it as well
Well... We can't parse it for now. Common Mark Markdown flavor doesn't specify struck-out text. (but rustdoc understand it) |
bd0427a
to
792ee12
Compare
<DOC_COMMENT>/// Some documentation <DOC_CODE>`with a code`</DOC_CODE>, <DOC_EMPHASIS>*an italic text*</DOC_EMPHASIS> | ||
/// and <DOC_STRONG>**a bold text**</DOC_STRONG> | ||
/// <DOC_HEADING># Heading</DOC_HEADING> | ||
/// <DOC_LINK>[Rust](https://www.rust-lang.org/)</DOC_LINK></DOC_COMMENT> |
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.
👍
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.
LGTM except minior comments
792ee12
to
04fdbdc
Compare
bors r=undin |
Build succeeded: |
Depends on #6502
highlight *emphasis* and **strong emphasis** text in rustdocs.
I'm not sure what color scheme should be used by default for *emphasis* text. It's assumed to be italic, but both default Light and Darcula themes highlight all doc comments as italic, hence plain italic *emphasis* would be indistinguishable from a regular doc text. I've used a scheme from #3739 where *strong emphasis* is highlighted as bold and *emphasis* is highlighted as italic and bold simultaneously.
Closes #3739
changelog: highlight *emphasis* and **strong emphasis** text in rustdocs