Add code highlighting in issue titles (#21432)

This changes the rendering logic of issue titles. If a substring in an
issue title is enclosed with a pair of backticks, it'll be rendered with
a monospace font (HTML `code` tag).

* Closes #20887

Signed-off-by: Yarden Shoham <hrsi88@gmail.com>
Co-authored-by: Gusted <williamzijl7@hotmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
Yarden Shoham 2022-10-15 21:24:41 +03:00 committed by GitHub
parent 671c609c46
commit b9cd6fb703
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 24 additions and 9 deletions

View file

@ -332,6 +332,11 @@ a.commit-statuses-trigger {
&:extend(.unselectable);
}
.issue-title code {
padding: 2px 4px;
border-radius: 6px;
background-color: var(--color-markup-code-block);
}
/* try to match button with no icons in height */
.icon-button {
padding-top: 7.42px !important;

View file

@ -141,10 +141,9 @@
}
code {
padding: 1px;
font-size: 85%;
background-color: rgba(0, 0, 0, .04);
padding: 2px 4px;
border-radius: 3px;
background-color: var(--color-markup-code-block);
word-break: break-all;
}