-
-
Notifications
You must be signed in to change notification settings - Fork 5.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
Feature request: Fancy styling of kbd tag #9242
Comments
Looking at the Markdown stylesheet, it looks like the styling is already inplace. The issue appears to be that the Markdown parser replaces the |
@FWDekker Gitea use Blackfriday as markdown processor and it looks like that blackfriday can't process |
It's probably a setting in the sanitizer: gitea/modules/markup/sanitizer.go Lines 36 to 50 in 1823697
|
[x]
):Description
The
<kbd>
tag can be used to display a keyboard shortcut in HTML/Markdown. While it is similar to using backticks (`) to display code, some websites style it to appear like an actual button. For example, on GitHub the input<kbd>Ctrl + C</kbd>
is rendered as Ctrl + C. I think this representation clearly indicates to readers that it's a keyboard shortcut rather than code.To give an example of a real-world usage of
<kbd>
, consider the README of this repository of mine where I explain which shortcuts my program accepts.I think Gitea should style
<kbd>
similar to how GitHub styles it, or should at the very least apply a monospace font to it.Screenshots
The screenshots below show how the following snippet of markdown is rendered differently by GitHub than by Gitea.
Input
Output (GitHub)
Output (Gitea)
The text was updated successfully, but these errors were encountered: